Total Complexity | 3 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class Index |
||
6 | { |
||
7 | /** |
||
8 | * @var int|string |
||
9 | */ |
||
10 | public $id; |
||
11 | |||
12 | /** |
||
13 | * @var int |
||
14 | */ |
||
15 | public $level; |
||
16 | |||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | public $left; |
||
21 | |||
22 | /** |
||
23 | * @var int |
||
24 | */ |
||
25 | public $right; |
||
26 | |||
27 | /** |
||
28 | * @var int|string |
||
29 | */ |
||
30 | public $parent; |
||
31 | |||
32 | /** |
||
33 | * @var static[] |
||
34 | */ |
||
35 | public $children = []; |
||
36 | |||
37 | 2 | public function __construct(array $properties) |
|
38 | { |
||
39 | 2 | foreach ($properties as $name => $property) { |
|
40 | 2 | $this->{$name} = $property; |
|
41 | } |
||
42 | } |
||
43 | |||
44 | 2 | public function addChild($index) |
|
47 | } |
||
48 | } |
||
49 |