| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | protected function import(DOMDocument $document, DomNode $node, array $statements) |
||
| 21 | { |
||
| 22 | /** @var Node $statement */ |
||
| 23 | foreach ($statements as $statement) { |
||
| 24 | $newNode = $statement->getNode()->cloneNode(false); |
||
| 25 | |||
| 26 | $newNode = $document->importNode($newNode); |
||
| 27 | $newNode = $node->appendChild($newNode); |
||
| 28 | if ($statement->hasChildren()) { |
||
| 29 | $this->import($document, $newNode, $statement->getChildren()); |
||
| 30 | } |
||
| 31 | } |
||
| 32 | } |
||
| 33 | } |
||
| 34 |