Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
26 | final class StrongRenderer implements NodeRendererInterface, XmlNodeRendererInterface |
||
27 | { |
||
28 | /** |
||
29 | * @param Strong $node |
||
30 | * |
||
31 | * {@inheritDoc} |
||
32 | * |
||
33 | * @psalm-suppress MoreSpecificImplementedParamType |
||
34 | */ |
||
35 | 225 | public function render(Node $node, ChildNodeRendererInterface $childRenderer) |
|
36 | { |
||
37 | 225 | Strong::assertInstanceOf($node); |
|
38 | |||
39 | 222 | $attrs = $node->data->get('attributes'); |
|
40 | |||
41 | 222 | return new HtmlElement('strong', $attrs, $childRenderer->renderNodes($node->children())); |
|
42 | } |
||
43 | |||
44 | 15 | public function getXmlTagName(Node $node): string |
|
45 | { |
||
46 | 15 | return 'strong'; |
|
47 | } |
||
48 | |||
49 | /** |
||
50 | * {@inheritDoc} |
||
51 | */ |
||
52 | 15 | public function getXmlAttributes(Node $node): array |
|
55 | } |
||
56 | } |
||
57 |