Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
13 | 2 | public function __construct(string $nodeString, int $line) |
|
14 | { |
||
15 | 2 | parent::__construct($nodeString, $line); |
|
16 | 2 | preg_match_all(Regex::MAPPING_VALUES, trim(substr(trim($nodeString), 1,-1)), $matches); |
|
17 | 2 | foreach ($matches['k'] as $index => $property) { |
|
18 | 2 | $pair = $property.': '.trim($matches['v'][$index]); |
|
19 | 2 | $child = NodeFactory::get($pair, $line); |
|
20 | 2 | $child->indent = null; |
|
21 | 2 | $this->add($child); |
|
22 | } |
||
36 | } |