| Total Complexity | 2 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | final class HtmlDecorator implements NodeRendererInterface |
||
| 20 | { |
||
| 21 | private NodeRendererInterface $inner; |
||
| 22 | private string $tag; |
||
| 23 | /** @var array<string, string|string[]|bool> */ |
||
| 24 | private array $attributes; |
||
| 25 | private bool $selfClosing; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param array<string, string|string[]|bool> $attributes |
||
| 29 | */ |
||
| 30 | 4 | public function __construct(NodeRendererInterface $inner, string $tag, array $attributes = [], bool $selfClosing = false) |
|
| 31 | { |
||
| 32 | 4 | $this->inner = $inner; |
|
| 33 | 4 | $this->tag = $tag; |
|
| 34 | 4 | $this->attributes = $attributes; |
|
| 35 | 4 | $this->selfClosing = $selfClosing; |
|
| 36 | 4 | } |
|
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritDoc} |
||
| 40 | */ |
||
| 41 | 4 | public function render(Node $node, ChildNodeRendererInterface $childRenderer) |
|
| 44 | } |
||
| 45 | } |
||
| 46 |