Conditions | 4 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function getItems(): array |
||
31 | { |
||
32 | if (empty($this->items)) { |
||
33 | $this->items = $this->container->getItems(); |
||
34 | } |
||
35 | |||
36 | uasort($this->items, function($a, $b) { |
||
37 | if (!($a instanceof SortableInterface && $b instanceof SortableInterface)) { |
||
38 | return 0; |
||
39 | } |
||
40 | |||
41 | return $a->getOrder() <=> $b->getOrder(); |
||
42 | }); |
||
43 | |||
44 | return $this->items; |
||
45 | } |
||
52 |