| Total Complexity | 3 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | class PermissionValidator extends AbstractValidator |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * Create new instance |
||
| 24 | * @param PermissionParam<TEntity> $param |
||
| 25 | * @param Lang $lang |
||
| 26 | */ |
||
| 27 | public function __construct(protected PermissionParam $param, Lang $lang) |
||
| 28 | { |
||
| 29 | parent::__construct($lang); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritdoc} |
||
| 34 | */ |
||
| 35 | public function setValidationData(): void |
||
| 36 | { |
||
| 37 | $this->addData('code', $this->param->getCode()); |
||
| 38 | $this->addData('description', $this->param->getDescription()); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * {@inheritdoc} |
||
| 43 | */ |
||
| 44 | public function setValidationRules(): void |
||
| 57 | ]); |
||
| 58 | } |
||
| 59 | } |
||
| 60 |