| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | final class ReplyRenderer implements NodeRendererInterface, XmlNodeRendererInterface |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @param Reply $node |
||
| 19 | * |
||
| 20 | * {@inheritDoc} |
||
| 21 | * |
||
| 22 | * @psalm-suppress MoreSpecificImplementedParamType |
||
| 23 | */ |
||
| 24 | public function render(Node $node, ChildNodeRendererInterface $childRenderer): Stringable |
||
| 25 | { |
||
| 26 | Reply::assertInstanceOf($node); |
||
| 27 | |||
| 28 | $attrs = $node->data->get('attributes'); |
||
| 29 | |||
| 30 | return new HtmlElement('a', $attrs, '<i class="fa fa-reply"></i> ' . Xml::escape($node->getLiteral()) . '<br>'); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function getXmlTagName(Node $node): string |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritDoc} |
||
| 40 | */ |
||
| 41 | public function getXmlAttributes(Node $node): array |
||
| 44 | } |
||
| 45 | } |
||
| 46 |