Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
46 | 5 | protected function addElement(\DomDocument $document, \DOMElement $rootElement, NodeInterface $node) : void |
|
47 | { |
||
48 | 5 | $description = htmlspecialchars($node->getDescription()); |
|
49 | 5 | $element = $document->createElement($this->getNodeName(), $description); |
|
50 | 5 | if ($description !== $node->getDescription() && $this->getNodeName() != 'description') { |
|
51 | $element->setAttribute('type', 'html'); |
||
52 | } |
||
53 | |||
54 | 5 | $rootElement->appendChild($element); |
|
55 | 5 | } |
|
56 | } |
||
57 |