Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | 39 | public function render(Node $node, ChildNodeRendererInterface $childRenderer): HtmlElement |
|
32 | { |
||
33 | 39 | if (! ($node instanceof DescriptionList)) { |
|
34 | 3 | throw new \InvalidArgumentException('Incompatible node type: ' . \get_class($node)); |
|
35 | } |
||
36 | |||
37 | 36 | $separator = $childRenderer->getBlockSeparator(); |
|
38 | |||
39 | 36 | return new HtmlElement('dl', [], $separator . $childRenderer->renderNodes($node->children()) . $separator); |
|
40 | } |
||
42 |