| Total Complexity | 5 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | #[Attribute(Attribute::TARGET_PROPERTY)] |
||
| 12 | class DateTimeLessThan extends AbstractValidation |
||
| 13 | { |
||
| 14 | public function __construct(private string $datetime = 'now', ?string $message = null) |
||
| 15 | { |
||
| 16 | parent::__construct($message ?? sprintf('The date/time should be less than %s', $this->datetime)); |
||
| 17 | } |
||
| 18 | |||
| 19 | private function datetime(): DateTimeInterface |
||
| 22 | } |
||
| 23 | |||
| 24 | protected function isValid($input, array $context = []): bool |
||
| 35 | } |
||
| 36 | } |
||
| 38 |