| Total Complexity | 5 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | #[Attribute(Attribute::TARGET_PROPERTY)] |
||
| 13 | class LessThan extends AbstractRule |
||
| 14 | { |
||
| 15 | public function __construct(private string $datetime = 'now', ?string $message = null) |
||
| 18 | } |
||
| 19 | |||
| 20 | private function datetime(): DateTimeInterface |
||
| 21 | { |
||
| 22 | return new DateTimeImmutable($this->datetime); |
||
| 23 | } |
||
| 24 | |||
| 25 | public function isValid($input, array $context = []): bool |
||
| 36 | } |
||
| 37 | } |
||
| 39 |