| Total Complexity | 4 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | use DateTimeInterface; |
||
| 6 | |||
| 7 | final readonly class DateTimeComparator implements ComparatorInterface |
||
|
|
|||
| 8 | { |
||
| 9 | 3 | public function compare(mixed $a, mixed $b): int |
|
| 10 | { |
||
| 11 | 3 | if ($a > $b) { |
|
| 12 | 1 | return 1; |
|
| 13 | } |
||
| 14 | |||
| 15 | 2 | if ($a < $b) { |
|
| 16 | 1 | return -1; |
|
| 17 | } |
||
| 18 | |||
| 19 | 1 | return 0; |
|
| 20 | } |
||
| 21 | |||
| 22 | 5 | public function supports(mixed $value): bool |
|
| 23 | { |
||
| 27 |