Total Complexity | 6 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Coverage | 94.44% |
Changes | 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 | 8 | public function getIterator(): Traversable |
|
45 | } |
||
46 | |||
47 | 8 | public function insert(Box $item): void |
|
50 | 8 | } |
|
51 | |||
52 | /** |
||
53 | * @param Box $boxA |
||
54 | * @param Box $boxB |
||
55 | */ |
||
56 | 6 | public function compare($boxA, $boxB): int |
|
75 |