mirror of
https://gitlab.com/uldvstar/exchange-2.0.git
synced 2026-08-19 04:24:16 +00:00
52 lines
1.1 KiB
PHP
52 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Wallets\Standards\Rules;
|
|
|
|
|
|
use App\Classes\General\Abstracts\AbstractRule;
|
|
use App\Classes\Modules\Wallets\DataTransferObjects\WalletObject;
|
|
use App\Classes\Modules\Wallets\Standards\Validators\ListWalletValidation;
|
|
|
|
class CanListWallet extends AbstractRule
|
|
{
|
|
|
|
/** @var ListWalletValidation */
|
|
private $listWalletValidation;
|
|
|
|
|
|
public function __construct(ListWalletValidation $listWalletValidation)
|
|
{
|
|
$this->listWalletValidation = $listWalletValidation;
|
|
}
|
|
|
|
|
|
/**
|
|
* @return bool
|
|
*/
|
|
protected function authorized(): bool
|
|
{
|
|
// TODO Set Authorization rules
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* @param WalletObject $object
|
|
* @return bool
|
|
* @throws \App\Classes\Exceptions\RequestValidationException
|
|
*/
|
|
protected function validators($object): bool
|
|
{
|
|
return $this->listWalletValidation->validate($object);
|
|
}
|
|
|
|
/**
|
|
* @param WalletTransactionObject $object
|
|
* @return bool
|
|
*/
|
|
protected function criteria($object): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
}
|