Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
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::SEQUENCE_VALUES, trim(substr(trim($nodeString), 1,-1)), $matches); |
|
17 | 2 | foreach ($matches['item'] as $key => $item) { |
|
18 | 2 | $i = new NodeItem('', $line); |
|
19 | 2 | $i->indent = null; |
|
20 | 2 | $itemValue = NodeFactory::get(trim($item)); |
|
21 | 2 | $itemValue->indent = null; |
|
22 | 2 | $i->add($itemValue); |
|
23 | 2 | $this->add($i); |
|
24 | } |
||
38 | } |