Conditions | 3 |
Paths | 4 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
43 | protected function collect(callable $test, \DOMNode $node, \DOMDocument $carry): \DOMNodeList |
||
44 | { |
||
45 | if ($test($node)) { |
||
46 | $carry->documentElement->appendChild($carry->importNode($node, true)); |
||
47 | } |
||
48 | |||
49 | return null !== $node->nextSibling ? |
||
50 | $this->collect($test, $node->nextSibling, $carry) : $carry->documentElement->childNodes; |
||
51 | } |
||
61 |