Total Complexity | 0 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class Node extends \stdClass |
||
6 | { |
||
7 | /** |
||
8 | * @var int<0, max> Current node ID |
||
9 | */ |
||
10 | public int $id = 0; |
||
11 | |||
12 | /** |
||
13 | * @var int<0, max>|null Parent node ID |
||
14 | */ |
||
15 | public ?int $parentId = null; |
||
16 | |||
17 | /** |
||
18 | * @var int<0, max> Level to get |
||
19 | */ |
||
20 | public int $level = 0; |
||
21 | |||
22 | /** |
||
23 | * @var int<0, max> Left leaf value |
||
24 | */ |
||
25 | public int $left = 0; |
||
26 | |||
27 | /** |
||
28 | * @var int<0, max> Right leaf value |
||
29 | */ |
||
30 | public int $right = 0; |
||
31 | |||
32 | /** |
||
33 | * @var int<0, max> Position inside peers |
||
34 | */ |
||
35 | public int $position = 0; |
||
36 | |||
37 | /** |
||
38 | * @var array<int<0, max>> Children of node - ids |
||
|
|||
39 | */ |
||
40 | public array $childrenIds = []; |
||
41 | |||
42 | /** |
||
43 | * @var array<int<0, max>, Node> Children of node - nodes |
||
44 | */ |
||
45 | public array $childrenNodes = []; |
||
46 | } |
||
47 |