1 | <?php |
||
12 | class Children |
||
13 | { |
||
14 | /** |
||
15 | * @var array $allowedTypes |
||
16 | */ |
||
17 | private $allowedTypes = [ |
||
18 | Node::class, |
||
19 | Closure::class, |
||
20 | 'array' |
||
21 | ]; |
||
22 | |||
23 | /** |
||
24 | * @var Node $node |
||
25 | */ |
||
26 | private $node; |
||
27 | |||
28 | /** |
||
29 | * @var array $children |
||
30 | */ |
||
31 | private $children; |
||
|
|||
32 | |||
33 | /** |
||
34 | * Children constructor. |
||
35 | * |
||
36 | * @param Node $node |
||
37 | */ |
||
38 | public function __construct(Node $node) |
||
42 | |||
43 | /** |
||
44 | * @param Node $node |
||
45 | * @param array $children |
||
46 | * @return mixed |
||
47 | */ |
||
48 | public static function run(Node $node, array $children) |
||
52 | |||
53 | /** |
||
54 | * @param array $children |
||
55 | */ |
||
56 | private function loop(array $children) |
||
65 | |||
66 | /** |
||
67 | * @param Node|array $node |
||
68 | * @return $this |
||
69 | */ |
||
70 | private function child($node) |
||
75 | |||
76 | /** |
||
77 | * @param mixed $type |
||
78 | * @return string |
||
79 | */ |
||
80 | private function realType($type) |
||
85 | |||
86 | /** |
||
87 | * @param $type |
||
88 | * @throws \Exception |
||
89 | */ |
||
90 | private function checkType($type) |
||
96 | } |
||
97 |
This check marks private properties in classes that are never used. Those properties can be removed.