<?php

namespace Modules\Stock\Rules;

use Modules\Fournisseur\Rules\Main;
use Modules\Stock\Helper\RulesHelper;
use PDO;
use Psr\Http\Message\ServerRequestInterface;

class BaseRules
{
    protected Main $main;

    public function __construct(
        protected readonly ServerRequestInterface $request,
        protected readonly PDO $pdo
    ) {
        $this->main = new Main($this->request, $this->pdo);
    }

    // phpcs:ignore
    public function init(): bool
    {
        return RulesHelper::hasStockAccessRights($this->pdo);
    }
}
