mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
50 lines
1.1 KiB
PHP
50 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Wallets\Standards\Rules;
|
|
|
|
|
|
use App\Classes\General\Abstracts\AbstractRule;
|
|
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(): bool
|
|
{
|
|
// TODO Set Authorization rules
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* @param CompanyWalletValidation $object
|
|
* @return bool
|
|
* @throws \App\Classes\Exceptions\RequestValidationException
|
|
*/
|
|
protected function validators($object): bool
|
|
{
|
|
return $this->walletTransactionValidation->validate($object);
|
|
}
|
|
|
|
/**
|
|
* @param SegmentCompanyValidation $object
|
|
* @return bool
|
|
*/
|
|
protected function criteria($object): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
} |