Conditions | 4 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
55 | 3069 | public function getIterator(): \Traversable |
|
56 | { |
||
57 | 3069 | if ($this->optimized === null) { |
|
58 | 3069 | \krsort($this->list); |
|
59 | |||
60 | 3069 | $sorted = []; |
|
61 | 3069 | foreach ($this->list as $group) { |
|
62 | 3042 | foreach ($group as $item) { |
|
63 | 3042 | $sorted[] = $item; |
|
64 | } |
||
65 | } |
||
66 | |||
67 | 3069 | $this->optimized = new \ArrayIterator($sorted); |
|
68 | } |
||
69 | |||
70 | 3069 | return $this->optimized; |
|
71 | } |
||
73 |