Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | final class Callback implements SerializableRuleInterface, BeforeValidationInterface |
||
16 | { |
||
17 | use BeforeValidationTrait; |
||
18 | use RuleNameTrait; |
||
19 | |||
20 | 4 | public function __construct( |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return callable |
||
36 | */ |
||
37 | 7 | public function getCallback(): callable |
|
40 | } |
||
41 | |||
42 | 2 | #[ArrayShape(['skipOnEmpty' => 'bool', 'skipOnError' => 'bool'])] |
|
43 | public function getOptions(): array |
||
44 | { |
||
45 | return [ |
||
46 | 2 | 'skipOnEmpty' => $this->skipOnEmpty, |
|
47 | 2 | 'skipOnError' => $this->skipOnError, |
|
48 | ]; |
||
49 | } |
||
50 | |||
51 | 3 | public function getHandlerClassName(): string |
|
54 | } |
||
55 | } |
||
56 |