Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
14 | 9 | public function extractFromRuleXmlElement(SimpleXMLElement $ruleXmlElement) : array |
|
15 | { |
||
16 | 9 | if (!isset($ruleXmlElement->properties)) { |
|
17 | 1 | return []; |
|
18 | } |
||
19 | |||
20 | 8 | $propertyValues = []; |
|
21 | 8 | foreach ($ruleXmlElement->properties->property as $propertyXmlElement) { |
|
22 | 8 | $name = (string) $propertyXmlElement['name']; |
|
23 | 8 | $value = $this->normalizeValue((string) $propertyXmlElement['value'], $propertyXmlElement); |
|
24 | 8 | $propertyValues[$name] = $value; |
|
25 | } |
||
26 | |||
27 | 8 | return $propertyValues; |
|
28 | } |
||
29 | |||
86 |