| 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 | 7 | use HandlerClassNameTrait; |
|
| 19 | use RuleNameTrait; |
||
| 20 | |||
| 21 | public function __construct( |
||
| 22 | public string $message = 'This value is not a valid.', |
||
| 23 | public bool $skipOnEmpty = false, |
||
| 24 | public bool $skipOnError = false, |
||
| 25 | 7 | public ?Closure $when = null, |
|
| 26 | ) { |
||
| 27 | } |
||
| 28 | 5 | ||
| 29 | /** |
||
| 30 | 5 | * Return custom rules set |
|
| 31 | 5 | */ |
|
| 32 | 4 | abstract public function getRuleSet(): array; |
|
| 33 | |||
| 34 | public function getOptions(): array |
||
| 35 | 5 | { |
|
| 36 | $dumper = new RulesDumper(); |
||
| 37 | |||
| 38 | return $dumper->asArray($this->getRuleSet(), true); |
||
| 39 | } |
||
| 40 | } |
||
| 41 |