Conditions | 4 |
Paths | 6 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | private function collectBNodes(?\DOMNode $node, array $nodes = []): array |
||
31 | { |
||
32 | if ($this->manager->isPairSideBNode($node)) { |
||
|
|||
33 | $nodes[] = $this->stringify($node); |
||
34 | } |
||
35 | if ($this->manager->isPairSideANode($node)) { |
||
36 | $node = $node->previousSibling; |
||
37 | } elseif (null !== $node->nextSibling) { |
||
38 | return $this->collectBNodes($node->nextSibling, $nodes); |
||
39 | } |
||
40 | |||
41 | return [ |
||
42 | 'currentNode' => $node, |
||
43 | 'bNodes' => $nodes, |
||
44 | ]; |
||
47 |