1 | <?php |
||
7 | class Utilities |
||
8 | { |
||
9 | /** |
||
10 | * Convert flat tree structure to nested. |
||
11 | * |
||
12 | * @param array $flatTree |
||
13 | * @param string $levelName |
||
14 | * |
||
15 | * @return array |
||
16 | */ |
||
17 | public static function flatToNested( |
||
23 | |||
24 | /** |
||
25 | * @param array $flatTree |
||
26 | * @param string $levelName |
||
27 | * @param null|int $level |
||
28 | * @param int $startPos |
||
29 | * @param array $result |
||
30 | * |
||
31 | * @return array |
||
32 | */ |
||
33 | private static function _flatToNested( |
||
69 | } |
||
70 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.