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