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