Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3.0176 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | 84 | public function render(AbstractBlock $block, ElementRendererInterface $htmlRenderer, $inTightList = false) |
|
32 | { |
||
33 | 84 | if (!($block instanceof ThematicBreak)) { |
|
34 | 3 | throw new \InvalidArgumentException('Incompatible block type: ' . get_class($block)); |
|
35 | } |
||
36 | |||
37 | 81 | $attrs = []; |
|
38 | 81 | foreach ($block->getData('attributes', []) as $key => $value) { |
|
39 | $attrs[$key] = $htmlRenderer->escape($value, true); |
||
40 | 81 | } |
|
41 | |||
42 | 81 | return new HtmlElement('hr', $attrs, '', true); |
|
43 | } |
||
44 | } |
||
45 |