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