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