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