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