Desc   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 2
c 2
b 0
f 0
dl 0
loc 14
ccs 5
cts 5
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A sort() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Budgegeria\IntlSort\Sorter;
6
7
use function array_reverse;
8
9
final class Desc implements Sorter
10
{
11 5
    public function __construct(private Sorter $sorter)
12
    {
13 5
    }
14
15
    /**
16
     * {@inheritDoc}
17
     */
18 5
    public function sort(array $values): array
19
    {
20 5
        $values = $this->sorter->sort($values);
21
22 4
        return array_reverse($values, true);
23
    }
24
}
25