Passed
Push — master ( a4e0c3...938fb4 )
by Claudio
02:13
created

Collator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 13
ccs 4
cts 4
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A compare() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Budgegeria\IntlSort;
6
7
use Collator as IntlCollector;
8
9
use function assert;
10
use function is_int;
11
12
class Collator extends IntlCollector
13
{
14
    /**
15
     * @param mixed $value
16
     * @param mixed $comparativeValue
17
     */
18 51
    public function compare($value, $comparativeValue): int
19
    {
20 51
        $result = parent::compare((string) $value, (string) $comparativeValue);
21
22 51
        assert(is_int($result));
23
24 51
        return $result;
25
    }
26
}
27