Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2.351 |
Changes | 0 |
1 | <?php |
||
34 | 23 | public function render(AbstractBlock $block, ElementRendererInterface $htmlRenderer, $inTightList = false) |
|
35 | { |
||
36 | 23 | if (!($block instanceof IconBlock)) { |
|
37 | throw new \InvalidArgumentException('Incompatible block type: ' . get_class($block)); |
||
38 | } |
||
39 | |||
40 | 23 | $htmlBlock = parent::render($block, $htmlRenderer, $inTightList); |
|
41 | 23 | $htmlBlock->setAttribute('class', $block->getTypeName()); |
|
42 | |||
43 | 23 | return $htmlBlock; |
|
44 | } |
||
45 | } |
||
46 |