| Total Complexity | 5 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | trait HasDomTrait |
||
| 12 | { |
||
| 13 | private DOMDocument $dom; |
||
| 14 | |||
| 15 | 36 | public function createElement(string $tagType): DOMElement |
|
| 16 | { |
||
| 17 | 36 | return $this->dom->createElement($tagType); |
|
| 18 | } |
||
| 19 | |||
| 20 | 25 | public function createText($text): DOMText |
|
| 21 | { |
||
| 22 | 25 | return new DOMText($text ?? ''); |
|
| 23 | } |
||
| 24 | |||
| 25 | 3 | public function createLineBreak(): DOMElement |
|
| 26 | { |
||
| 27 | 3 | return $this->createElement('br'); |
|
| 28 | } |
||
| 29 | |||
| 30 | 69 | public function getDom(): DOMDocument |
|
| 31 | { |
||
| 32 | 69 | return $this->dom; |
|
| 33 | } |
||
| 34 | |||
| 35 | 69 | public function setDom($dom): void |
|
| 38 | } |
||
| 39 | } |
||
| 40 |