| Conditions | 4 |
| Paths | 8 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function isValid($input, array $context = []): bool |
||
| 21 | { |
||
| 22 | try { |
||
| 23 | $datetime = |
||
| 24 | $input instanceof DateTimeInterface ? |
||
| 25 | $input : |
||
| 26 | new DateTimeImmutable($input); |
||
| 27 | |||
| 28 | return array_key_exists($this->other, $context) |
||
| 29 | && $datetime > (new DateTimeImmutable($context[$this->other])); |
||
| 30 | } catch (Throwable) { |
||
| 31 | return false; |
||
| 32 | } |
||
| 35 |