| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | final class TextRenderer implements NodeRendererInterface, XmlNodeRendererInterface |
||
| 27 | { |
||
| 28 | /** |
||
| 29 | * @param Text $node |
||
| 30 | * |
||
| 31 | * {@inheritDoc} |
||
| 32 | * |
||
| 33 | * @psalm-suppress MoreSpecificImplementedParamType |
||
| 34 | */ |
||
| 35 | 2556 | public function render(Node $node, ChildNodeRendererInterface $childRenderer) |
|
| 36 | { |
||
| 37 | 2556 | Text::assertInstanceOf($node); |
|
| 38 | |||
| 39 | 2553 | return Xml::escape($node->getLiteral()); |
|
| 40 | } |
||
| 41 | |||
| 42 | 123 | public function getXmlTagName(Node $node): string |
|
| 43 | { |
||
| 44 | 123 | return 'text'; |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritDoc} |
||
| 49 | */ |
||
| 50 | 123 | public function getXmlAttributes(Node $node): array |
|
| 53 | } |
||
| 54 | } |
||
| 55 |