<?php

namespace App\Classes\Modules\Orders\Standards\Rules;

use App\Classes\General\Abstracts\AbstractRule;
use App\Classes\Modules\Orders\Standards\Validators\UpdateCurrentStepValidation;

class CanUpdateCurrentStep extends AbstractRule
{
    private $orderValidation;

    public function __construct(UpdateCurrentStepValidation $orderValidation)
    {
        $this->orderValidation = $orderValidation;
    }

    /**
     * @return bool
     */
    protected function authorized(): bool
    {
        // TODO  Set Authorization rules
        return true;
    }

    protected function validators($object): bool
    {
        return $this->orderValidation->validate($object);
    }

    /**
     * @param CompanyObject $object
     * @return bool
     */
    protected function criteria($object): bool
    {
        return true;
    }
}