| Total Complexity | 5 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | abstract class AbstractRule implements Rule, BelongsToField |
||
| 9 | { |
||
| 10 | use ValidateOrFailTrait, |
||
| 11 | BelongsToFieldTrait; |
||
| 12 | |||
| 13 | protected string $message; |
||
| 14 | |||
| 15 | public function __construct(?string $message = null) |
||
| 18 | } |
||
| 19 | |||
| 20 | public function message(): string |
||
| 21 | { |
||
| 22 | return $this->message; |
||
| 23 | } |
||
| 24 | |||
| 25 | /** @inheritDoc */ |
||
| 26 | public function validate(mixed $input, array $context = []): Result |
||
| 32 | } |
||
| 33 | |||
| 34 | private function className(): string |
||
| 37 | } |
||
| 38 | |||
| 39 | abstract public function isValid(mixed $input, array $context = []): bool; |
||
| 40 | } |
||
| 41 |