Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
31 | 2028 | public function render(AbstractBlock $block, NodeRendererInterface $htmlRenderer, bool $inTightList = false) |
|
32 | { |
||
33 | 2028 | if (!($block instanceof Paragraph)) { |
|
34 | 3 | throw new \InvalidArgumentException('Incompatible block type: ' . \get_class($block)); |
|
35 | } |
||
36 | |||
37 | 2025 | if ($inTightList) { |
|
38 | 165 | return $htmlRenderer->renderInlines($block->children()); |
|
39 | } |
||
40 | |||
41 | 1908 | $attrs = $block->getData('attributes', []); |
|
42 | |||
43 | 1908 | return new HtmlElement('p', $attrs, $htmlRenderer->renderInlines($block->children())); |
|
44 | } |
||
45 | } |
||
46 |