| Total Complexity | 6 | 
| Total Lines | 44 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 9 | class NAryTreeFactory | ||
| 10 | { | ||
| 11 | /** | ||
| 12 | * @TODO write example regarding expecting list format ! | ||
| 13 | * | ||
| 14 | * @template TNode of Node The actual Node class | ||
| 15 | * @template TValue of mixed The actual Node value type | ||
| 16 | * | ||
| 17 | * | ||
| 18 | * @param mixed[] $list ⚠ Must be a 0 indexed list, 0 to n consecutive indexes | ||
| 19 | * @phpstan-param list<TValue|null> $list | ||
| 20 | * @phpstan-param callable(TValue $v): TNode $nodeCreator | ||
| 21 | * | ||
| 22 | * @phpstan-return ?TNode | ||
| 23 | */ | ||
| 24 | 4 | public static function fromLevelOrderList(array $list, callable $nodeCreator): ?Node | |
| 55 |