| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | abstract class GroupRule implements SerializableRuleInterface, BeforeValidationInterface |
||
| 20 | { |
||
| 21 | use BeforeValidationTrait; |
||
| 22 | use RuleNameTrait; |
||
| 23 | |||
| 24 | 2 | public function __construct( |
|
| 25 | private string $message = 'This value is not a valid.', |
||
| 26 | private bool $skipOnEmpty = false, |
||
| 27 | private bool $skipOnError = false, |
||
| 28 | /** |
||
| 29 | * @var Closure(mixed, ValidationContext):bool|null |
||
| 30 | */ |
||
| 31 | private ?Closure $when = null, |
||
| 32 | ) { |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | 4 | public function getMessage(): string |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Return custom rules set |
||
| 45 | */ |
||
| 46 | abstract public function getRuleSet(): array; |
||
| 47 | |||
| 48 | 1 | public function getOptions(): array |
|
| 49 | { |
||
| 50 | 1 | return (new RulesDumper())->asArray($this->getRuleSet()); |
|
| 51 | } |
||
| 52 | |||
| 53 | 1 | public function getHandlerClassName(): string |
|
| 56 | } |
||
| 57 | } |
||
| 58 |