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