<?php

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


use App\Classes\General\Abstracts\AbstractRule;
use App\Classes\Modules\Wallets\DataTransferObjects\WalletTransactionObject;
use App\Classes\Modules\Wallets\Standards\Validators\WalletTransactionValidation;

class CanCreateWalletTransaction extends AbstractRule
{

    /** @var WalletTransactionValidation */
    private $walletTransactionValidation;

  
    public function __construct(WalletTransactionValidation $walletTransactionValidation)
    {
        $this->walletTransactionValidation = $walletTransactionValidation;
    }


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

    /**
     * @param WalletTransactionObject $object
     * @return bool
     * @throws \App\Classes\Exceptions\RequestValidationException
     */
    protected function validators($object): bool
    {
        return $this->walletTransactionValidation->validate($object);
    }

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

}