Total Complexity | 2 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | final readonly class UnicodeCIComparator extends UnicodeComparator |
||
|
|||
6 | { |
||
7 | /** |
||
8 | * {@inheritdoc} |
||
9 | */ |
||
10 | 4 | public function compare(mixed $a, mixed $b): int |
|
11 | { |
||
12 | 4 | return parent::compare($this->filter($a), $this->filter($b)); |
|
13 | } |
||
14 | |||
15 | /** |
||
16 | * @param string $value |
||
17 | * |
||
18 | * @return string |
||
19 | */ |
||
20 | 4 | private function filter(string $value): string |
|
21 | { |
||
22 | 4 | return mb_strtolower($value, 'UTF-8'); |
|
23 | } |
||
25 |