Total Complexity | 3 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class AuthValidator extends AbstractValidator |
||
21 | { |
||
22 | /** |
||
23 | * The parameter instance |
||
24 | * @var AuthParam<TEntity> |
||
25 | */ |
||
26 | protected AuthParam $param; |
||
27 | |||
28 | /** |
||
29 | * Create new instance |
||
30 | * @param AuthParam<TEntity> $param |
||
31 | * @param Lang $lang |
||
32 | */ |
||
33 | public function __construct(AuthParam $param, Lang $lang) |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | public function setValidationData(): void |
||
43 | { |
||
44 | $this->addData('username', $this->param->getUsername()); |
||
45 | $this->addData('password', $this->param->getPassword()); |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | public function setValidationRules(): void |
||
64 | ]); |
||
65 | } |
||
67 |