Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
1 | <?php |
||
44 | 77 | public function sortDescending(array $prefList) |
|
45 | { |
||
46 | 77 | $comparator = new MatchedPreferenceComparator(); |
|
47 | |||
48 | 77 | usort( |
|
49 | 77 | $prefList, |
|
50 | 68 | function (MatchedPreferenceInterface $lValue, MatchedPreferenceInterface $rValue) use ($comparator) { |
|
51 | 68 | return $comparator->compare($lValue, $rValue); |
|
52 | } |
||
53 | 77 | ); |
|
54 | |||
55 | 77 | return $prefList; |
|
56 | } |
||
57 | } |
||
58 |