<?php

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

use App\Classes\General\Abstracts\AbstractRule;
use App\Classes\Modules\Steps\Standards\Validators\UpdateStepValidation;

class CanUpdateStep extends AbstractRule
{
    private $orderValidation;

    public function __construct(UpdateStepValidation $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;
    }
}