Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2.0116 |
Changes | 0 |
1 | <?php |
||
25 | 69 | public function render(AbstractBlock $block, ElementRendererInterface $htmlRenderer, bool $inTightList = false) |
|
26 | { |
||
27 | 69 | if (!$block instanceof Table) { |
|
28 | throw new \InvalidArgumentException('Incompatible block type: ' . get_class($block)); |
||
29 | } |
||
30 | |||
31 | 69 | $attrs = $block->getData('attributes', []); |
|
32 | |||
33 | 69 | $separator = $htmlRenderer->getOption('inner_separator', "\n"); |
|
34 | |||
35 | 69 | $children = $htmlRenderer->renderBlocks($block->children()); |
|
36 | |||
37 | 69 | return new HtmlElement('table', $attrs, $separator . \trim($children) . $separator); |
|
38 | } |
||
39 | } |
||
40 |