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