| Conditions | 2 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | public function toHierarchy(): BaseCollection |
||
| 10 | { |
||
| 11 | $dict = $this->getDictionary(); |
||
| 12 | |||
| 13 | // Enforce sorting by $orderColumn setting in Baum\Node instance |
||
| 14 | uasort($dict, function ($a, $b) { |
||
| 15 | return ($a->getOrder() >= $b->getOrder()) ? 1 : -1; |
||
| 16 | }); |
||
| 17 | |||
| 18 | return new BaseCollection($this->hierarchical($dict)); |
||
| 19 | } |
||
| 46 |