Total Complexity | 5 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | #[Attribute(Attribute::TARGET_PROPERTY)] |
||
13 | class LessThanAnother extends AbstractValidation |
||
14 | { |
||
15 | public function __construct(private string $other, ?string $message = null) |
||
16 | { |
||
17 | parent::__construct($message ?? sprintf('The date/time should be less than %s', $this->other)); |
||
18 | } |
||
19 | |||
20 | protected function evaluate($input, array $context = []): bool |
||
32 | } |
||
33 | } |
||
35 |