Test Failed
Push — main ( bd5910...7fd4c8 )
by Diego
07:59 queued 04:39
created

UnicodeCIComparator::compare()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Ninja\Sorter\Comparator;
4
5
final readonly class UnicodeCIComparator extends UnicodeComparator
0 ignored issues
show
Bug introduced by
A parse error occurred: Syntax error, unexpected T_READONLY, expecting T_CLASS on line 5 at column 6
Loading history...
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
    }
24
}
25