Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
1 | <?php |
||
23 | 7 | public function sortAscending(array $prefList) |
|
24 | { |
||
25 | 7 | $comparator = new MatchedPreferenceComparator(); |
|
26 | |||
27 | 7 | usort( |
|
28 | 7 | $prefList, |
|
29 | function (MatchedPreferenceInterface $lValue, MatchedPreferenceInterface $rValue) use ($comparator) { |
||
30 | 7 | return -1 * $comparator->compare($lValue, $rValue); |
|
31 | } |
||
32 | 7 | ); |
|
33 | |||
34 | 7 | return $prefList; |
|
35 | } |
||
36 | |||
58 |