Conditions | 4 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
17 | 50 | public function __construct(array $config = []) |
|
18 | { |
||
19 | 50 | foreach ($config as $key => $value) { |
|
20 | 50 | if ($key === 'children') { |
|
21 | 50 | foreach ($value as $propertyName => $property) { |
|
22 | 50 | $this->children[$propertyName] = new static($property); |
|
23 | } |
||
24 | } else { |
||
25 | 50 | $this->{$key} = $value; |
|
26 | } |
||
27 | } |
||
28 | 50 | } |
|
29 | |||
39 |