| Conditions | 4 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 21 | 9 | public function setProperty(NodeInterface $node, \DOMElement $element) : void |
|
| 22 | { |
||
| 23 | 9 | $string = ''; |
|
| 24 | 9 | if ($element->firstChild && $element->firstChild->nodeType == XML_CDATA_SECTION_NODE) { |
|
| 25 | 1 | $string = $element->firstChild->textContent; |
|
| 26 | } else { |
||
| 27 | 9 | foreach ($element->childNodes as $childNode) { |
|
| 28 | 9 | $string .= $element->ownerDocument->saveXML($childNode); |
|
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 32 | 9 | $node->setDescription(htmlspecialchars_decode($string)); |
|
| 33 | 9 | } |
|
| 34 | |||
| 53 |