Passed
Push — master ( 85d747...30b51c )
by Chubarov
42s
created
src/Handlers/XmlHandler.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -122,9 +122,9 @@  discard block
 block discarded – undo
122 122
         return $this->validText;
123 123
     }
124 124
     
125
-     /**
126
-     * @return array|null
127
-     */
125
+        /**
126
+         * @return array|null
127
+         */
128 128
     public function getError()
129 129
     {
130 130
         if (isset($this->response->innererror)) {
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      */
140 140
     public function toArray()
141 141
     {
142
-       return  $this->xmlToArrayRecursive($this->validText);
142
+        return  $this->xmlToArrayRecursive($this->validText);
143 143
     }
144 144
 
145 145
     /**
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -84,12 +84,12 @@  discard block
 block discarded – undo
84 84
         $this->response      = simplexml_load_string($response);
85 85
         $copyXml             = $this->response;
86 86
 
87
-        if ( $this->response === false || $this->checkIntegrity($this->response) === false )
87
+        if ($this->response === false || $this->checkIntegrity($this->response) === false)
88 88
         {
89 89
             return [];
90 90
         }
91 91
 
92
-            $array_vars_list    = get_object_vars($copyXml);
92
+            $array_vars_list = get_object_vars($copyXml);
93 93
 
94 94
             if (key_exists('content', $array_vars_list)) {
95 95
                 return $this->arrayOne();
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function checkIntegrity($response)
109 109
     {
110
-        if ( empty($response->message) )
110
+        if (empty($response->message))
111 111
         {
112 112
             return true;
113 113
         }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     public function getError()
129 129
     {
130 130
         if (isset($this->response->innererror)) {
131
-            return (array)$this->response->innererror;
131
+            return (array) $this->response->innererror;
132 132
         }
133 133
 
134 134
         return null;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     private function workspace()
168 168
     {
169 169
         foreach ($this->response->workspace->collection as $item) {
170
-            $this->validText[] = get_object_vars($item->children(  $this->namespaces['NamespaceAtom'] ))['title'];
170
+            $this->validText[] = get_object_vars($item->children($this->namespaces['NamespaceAtom']))['title'];
171 171
         }
172 172
         return $this;
173 173
     }
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
      */
180 180
     private function arrayMany()
181 181
     {
182
-            foreach ($this->response->children( $this->namespaces['NamespaceAtom'] )->entry as $item ) {
183
-                $this->validText[] =   $item->content->children( $this->namespaces['NamespaceMetadata'] )
182
+            foreach ($this->response->children($this->namespaces['NamespaceAtom'])->entry as $item) {
183
+                $this->validText[] = $item->content->children($this->namespaces['NamespaceMetadata'])
184 184
                     ->children($this->namespaces['NamespaceDataServices']);
185 185
             }
186 186
             return $this;
@@ -191,9 +191,9 @@  discard block
 block discarded – undo
191 191
      */
192 192
     private function arrayOne()
193 193
     {
194
-        $this->validText = $this->response->children( $this->namespaces['NamespaceAtom'] )->content
195
-            ->children( $this->namespaces['NamespaceMetadata'] )
196
-            ->children( $this->namespaces['NamespaceDataServices'] );
194
+        $this->validText = $this->response->children($this->namespaces['NamespaceAtom'])->content
195
+            ->children($this->namespaces['NamespaceMetadata'])
196
+            ->children($this->namespaces['NamespaceDataServices']);
197 197
         return $this;
198 198
     }
199 199
 
@@ -230,11 +230,11 @@  discard block
 block discarded – undo
230 230
         $xmlns_dcd->appendChild($valued);
231 231
 
232 232
         //----------  properties  ----------//
233
-        $properties   = $dom->createElement('m:properties');
233
+        $properties = $dom->createElement('m:properties');
234 234
         $content->appendChild($properties);
235 235
 
236 236
         foreach ($data as $nameField => $valueField) {
237
-            $element  = $dom->createElement($this->prefixNamespace.':'.$nameField);
237
+            $element  = $dom->createElement($this->prefixNamespace . ':' . $nameField);
238 238
             $properties->appendChild($element);
239 239
             $valued   = $dom->createTextNode($valueField);
240 240
             $element->appendChild($valued);
Please login to merge, or discard this patch.