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