Passed
Push — master ( 1fcf08...b6e803 )
by Evgenii
16:32 queued 13:25
created
src/Models/BaseXmlObject.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,8 +35,9 @@  discard block
 block discarded – undo
35 35
      */
36 36
     protected function processAttributeNameAndValue($mainElement, $attributeName, $attributeValue): void
37 37
     {
38
-        if (empty($attributeValue))
39
-            return;
38
+        if (empty($attributeValue)) {
39
+                    return;
40
+        }
40 41
         if (is_array($attributeValue)) {
41 42
             $this->addValueAsArray($mainElement, $attributeName, $attributeValue);
42 43
         } elseif (is_object($attributeValue)) {
@@ -69,8 +70,9 @@  discard block
 block discarded – undo
69 70
     protected function addValueAsObject($mainElement, $attributeValue)
70 71
     {
71 72
         $newXmlObject = $mainElement->addChild($attributeValue->getAsXmlObject()->getName());
72
-        foreach ($attributeValue->getAsXmlObject()->children() as $child)
73
-            $newXmlObject->addChild($child->getName(), $child);
73
+        foreach ($attributeValue->getAsXmlObject()->children() as $child) {
74
+                    $newXmlObject->addChild($child->getName(), $child);
75
+        }
74 76
     }
75 77
 
76 78
     /**
@@ -81,8 +83,9 @@  discard block
 block discarded – undo
81 83
      */
82 84
     protected function addValueAsString(SimpleXMLElement $mainElement, $attributeName, $attributeValue): void
83 85
     {
84
-        if (empty($attributeValue))
85
-            return;
86
+        if (empty($attributeValue)) {
87
+                    return;
88
+        }
86 89
         if ($attributeName === 'title') {
87 90
             $mainElement[0] = $attributeValue;
88 91
         } elseif (substr($attributeName, 0, 1) === '_') {
Please login to merge, or discard this patch.
src/Models/DalliApiBody.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,11 +20,13 @@
 block discarded – undo
20 20
 
21 21
     public function __construct(?string $apiMethodName, ?string $authToken)
22 22
     {
23
-        if (empty($apiMethodName))
24
-            throw new ErrorException('Api method name is empty.');
23
+        if (empty($apiMethodName)) {
24
+                    throw new ErrorException('Api method name is empty.');
25
+        }
25 26
 
26
-        if (empty($authToken))
27
-            throw new ErrorException('Auth token is empty.');
27
+        if (empty($authToken)) {
28
+                    throw new ErrorException('Auth token is empty.');
29
+        }
28 30
         
29 31
         $this->apiMethodName = $apiMethodName;
30 32
         $this->authToken = $authToken;
Please login to merge, or discard this patch.