Total Complexity | 6 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | class BoxList implements IteratorAggregate |
||
22 | { |
||
23 | /** |
||
24 | * List containing boxes. |
||
25 | * |
||
26 | * @var Box[] |
||
27 | */ |
||
28 | private $list = []; |
||
29 | |||
30 | /** |
||
31 | * Has this list already been sorted? |
||
32 | * |
||
33 | * @var bool |
||
34 | */ |
||
35 | private $isSorted = false; |
||
36 | |||
37 | /** |
||
38 | * @return Traversable|Box[] |
||
39 | */ |
||
40 | 37 | public function getIterator(): Traversable |
|
48 | } |
||
49 | |||
50 | 36 | public function insert(Box $item): void |
|
53 | 36 | } |
|
54 | |||
55 | /** |
||
56 | * @param Box $boxA |
||
57 | * @param Box $boxB |
||
58 | */ |
||
59 | 22 | public static function compare($boxA, $boxB): int |
|
79 |