| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | 2985 | public function render(Node $node, ChildNodeRendererInterface $childRenderer): string |
|
| 36 | { |
||
| 37 | 2985 | if (! ($node instanceof Document)) { |
|
| 38 | 3 | throw new \InvalidArgumentException('Incompatible node type: ' . \get_class($node)); |
|
| 39 | } |
||
| 40 | |||
| 41 | 2982 | $wholeDoc = $childRenderer->renderNodes($node->children()); |
|
| 42 | |||
| 43 | 2982 | return $wholeDoc === '' ? '' : $wholeDoc . "\n"; |
|
| 44 | } |
||
| 46 |