@@ -32,8 +32,9 @@ discard block |
||
32 | 32 | */ |
33 | 33 | protected function processAttributeNameAndValue($mainElement, $attributeName, $attributeValue): void |
34 | 34 | { |
35 | - if (empty($attributeValue)) |
|
36 | - return; |
|
35 | + if (empty($attributeValue)) { |
|
36 | + return; |
|
37 | + } |
|
37 | 38 | if (is_array($attributeValue)) { |
38 | 39 | $this->addValueAsArray($mainElement, $attributeName, $attributeValue); |
39 | 40 | } elseif (is_object($attributeValue)) { |
@@ -66,8 +67,9 @@ discard block |
||
66 | 67 | protected function addValueAsObject($mainElement, $attributeValue) |
67 | 68 | { |
68 | 69 | $newXmlObject = $mainElement->addChild($attributeValue->getAsXmlObject()->getName()); |
69 | - foreach ($attributeValue->getAsXmlObject()->children() as $child) |
|
70 | - $newXmlObject->addChild($child->getName(), $child); |
|
70 | + foreach ($attributeValue->getAsXmlObject()->children() as $child) { |
|
71 | + $newXmlObject->addChild($child->getName(), $child); |
|
72 | + } |
|
71 | 73 | } |
72 | 74 | |
73 | 75 | /** |
@@ -78,8 +80,9 @@ discard block |
||
78 | 80 | */ |
79 | 81 | protected function addValueAsString($mainElement, $attributeName, $attributeValue) |
80 | 82 | { |
81 | - if (empty($attributeValue)) |
|
82 | - return null; |
|
83 | + if (empty($attributeValue)) { |
|
84 | + return null; |
|
85 | + } |
|
83 | 86 | if (substr($attributeName, 0, 1) === '_') { |
84 | 87 | return $mainElement->addAttribute(substr($attributeName, 1), $attributeValue); |
85 | 88 | } else { |