Conditions | 3 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3.0067 |
Changes | 0 |
1 | <?php |
||
53 | 21 | protected function sort() |
|
54 | { |
||
55 | 21 | uasort( |
|
56 | 21 | $this->list, |
|
57 | 11 | function (Box $boxA, Box $boxB) { |
|
58 | 11 | if ($boxB->getInnerVolume() > $boxA->getInnerVolume()) { |
|
59 | 4 | return -1; |
|
60 | 10 | } elseif ($boxB->getInnerVolume() < $boxA->getInnerVolume()) { |
|
61 | 10 | return 1; |
|
62 | } else { |
||
63 | return 0; |
||
64 | } |
||
65 | } |
||
66 | 21 | ); |
|
67 | 21 | } |
|
68 | |||
71 |