Total Complexity | 4 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | abstract class GroupRule implements ParametrizedRuleInterface |
||
17 | { |
||
18 | use HandlerClassNameTrait; |
||
19 | use RuleNameTrait; |
||
20 | |||
21 | public function __construct( |
||
22 | private string $message = 'This value is not a valid.', |
||
23 | private bool $skipOnEmpty = false, |
||
24 | private bool $skipOnError = false, |
||
25 | private ?Closure $when = null, |
||
26 | ) { |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @return string |
||
31 | */ |
||
32 | 4 | public function getMessage(): string |
|
33 | { |
||
34 | 4 | return $this->message; |
|
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return bool |
||
39 | */ |
||
40 | public function isSkipOnEmpty(): bool |
||
41 | { |
||
42 | return $this->skipOnEmpty; |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @return bool |
||
71 |