| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 261 | public function render(AbstractInline $inline, ElementRendererInterface $htmlRenderer) |
|
| 31 | { |
||
| 32 | 261 | if (!($inline instanceof Emphasis)) { |
|
| 33 | 3 | throw new \InvalidArgumentException('Incompatible inline type: ' . get_class($inline)); |
|
| 34 | } |
||
| 35 | |||
| 36 | 258 | $attrs = []; |
|
| 37 | 258 | foreach ($inline->getData('attributes', []) as $key => $value) { |
|
| 38 | 3 | $attrs[$key] = $htmlRenderer->escape($value, true); |
|
|
|
|||
| 39 | 172 | } |
|
| 40 | |||
| 41 | 258 | return new HtmlElement('em', $attrs, $htmlRenderer->renderInlines($inline->children())); |
|
| 42 | } |
||
| 43 | } |
||
| 44 |
This method has been deprecated.