| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class TextNode extends AbstractNode |
||
| 19 | { |
||
| 20 | use IsChildlessTrait; |
||
| 21 | use StringSanitizerTrait; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | private $text; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Default values. |
||
| 30 | * |
||
| 31 | * @param NodeInterface $parent |
||
| 32 | * @param string $text |
||
| 33 | */ |
||
| 34 | 3 | public function __construct(NodeInterface $parent, string $text) |
|
| 35 | { |
||
| 36 | 3 | parent::__construct($parent); |
|
| 37 | |||
| 38 | 3 | $this->text = $text; |
|
| 39 | 3 | } |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | 3 | public function render(): string |
|
| 47 | } |
||
| 48 | } |
||
| 49 |