| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | 9 | public function render(AbstractInline $inline, ElementRendererInterface $htmlRenderer) |
|
| 12 | { |
||
| 13 | 9 | if (!($inline instanceof StrikethroughElement)) { |
|
| 14 | 3 | throw new \InvalidArgumentException('Incompatible inline type: ' . get_class($inline)); |
|
| 15 | } |
||
| 16 | |||
| 17 | 6 | $attrs = []; |
|
| 18 | 6 | foreach ($inline->getData('attributes', []) as $key => $value) { |
|
| 19 | 3 | $attrs[$key] = $value; |
|
| 20 | 4 | } |
|
| 21 | 6 | return new HtmlElement('del', $attrs, $inline->getContent()); |
|
| 22 | } |
||
| 23 | } |