Conditions | 2 |
Paths | 4 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | protected function evaluate($input, array $context = []): bool |
||
22 | { |
||
23 | try { |
||
24 | $now = new DateTimeImmutable(); |
||
25 | $datetime = new DateTimeImmutable($input); |
||
26 | $format = self::CURRENT_YEAR; |
||
27 | return $datetime->format($format) === $now->format($format); |
||
28 | } catch (Throwable) { |
||
29 | return false; |
||
30 | } |
||
33 |