Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | 1 | public function __construct($resource, $sort = null, bool $usingSort = true, bool $loadMissing = true) |
|
17 | { |
||
18 | 1 | $collection = $resource->toTree($usingSort, $loadMissing); |
|
19 | |||
20 | 1 | if ($sort) { |
|
21 | 1 | $collection->sortTree($sort); |
|
22 | } |
||
23 | |||
24 | 1 | parent::__construct($collection->getChildren()); |
|
25 | } |
||
27 |