Total Complexity | 6 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class AttributeNode extends AbstractNode |
||
21 | { |
||
22 | /** @var string @read-only */ |
||
23 | public $name, $space, $quote; |
||
24 | |||
25 | /** @var string|null */ |
||
26 | public $value; |
||
27 | |||
28 | /** @var SelfCloseNode|ElementNode|null */ |
||
29 | public $node; |
||
30 | |||
31 | 1 | public function __construct(string $name, ?string $value = null, string $space = ' ', bool $noQuote = false) |
|
32 | { |
||
33 | 1 | $this->name = $name; |
|
34 | 1 | $this->value = $value; |
|
35 | 1 | $this->space = $space; |
|
36 | 1 | $this->quote = $noQuote ? '' : (null !== $value && \str_contains($value, '"') ? '\'' : '"'); |
|
37 | } |
||
38 | |||
39 | 1 | public function __toString(): string |
|
46 | } |
||
47 | } |
||
48 |