Completed
Pull Request — master (#36)
by
unknown
05:44
created
src/PleskX/Api/Client.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -346,12 +346,12 @@
 block discarded – undo
346 346
         foreach ($array as $key => $value) {
347 347
             if (is_array($value)) {
348 348
                 if ($this->_isAssoc($value)){ //assoc
349
-                  $this->_arrayToXml($value, $xml->addChild($key));
349
+                    $this->_arrayToXml($value, $xml->addChild($key));
350 350
                 }
351 351
                 else{ //indexed
352
-                  foreach ($value as $sub_value){
352
+                    foreach ($value as $sub_value){
353 353
                     $xml->addChild($key, $sub_value);
354
-                  }
354
+                    }
355 355
                 }
356 356
             } else {
357 357
                 $xml->addChild($key, $value);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     {
127 127
         $protocolVersion = !is_null($version) ? $version : $this->_version;
128 128
         $content = "<?xml version='1.0' encoding='UTF-8' ?>";
129
-        $content .= "<packet" . ("" === $protocolVersion ? "" : " version='$protocolVersion'") . "/>";
129
+        $content .= "<packet".("" === $protocolVersion ? "" : " version='$protocolVersion'")."/>";
130 130
         return new SimpleXMLElement($content);
131 131
     }
132 132
 
@@ -345,11 +345,11 @@  discard block
 block discarded – undo
345 345
     {
346 346
         foreach ($array as $key => $value) {
347 347
             if (is_array($value)) {
348
-                if ($this->_isAssoc($value)){ //assoc
348
+                if ($this->_isAssoc($value)) { //assoc
349 349
                   $this->_arrayToXml($value, $xml->addChild($key));
350 350
                 }
351
-                else{ //indexed
352
-                  foreach ($value as $sub_value){
351
+                else { //indexed
352
+                  foreach ($value as $sub_value) {
353 353
                     $xml->addChild($key, $sub_value);
354 354
                   }
355 355
                 }
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
     protected function _getOperator($name)
375 375
     {
376 376
         if (!isset($this->_operatorsCache[$name])) {
377
-            $className = '\\PleskX\\Api\\Operator\\' . $name;
377
+            $className = '\\PleskX\\Api\\Operator\\'.$name;
378 378
             $this->_operatorsCache[$name] = new $className($this);
379 379
         }
380 380
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -347,8 +347,7 @@  discard block
 block discarded – undo
347 347
             if (is_array($value)) {
348 348
                 if ($this->_isAssoc($value)){ //assoc
349 349
                   $this->_arrayToXml($value, $xml->addChild($key));
350
-                }
351
-                else{ //indexed
350
+                } else{ //indexed
352 351
                   foreach ($value as $sub_value){
353 352
                     $xml->addChild($key, $sub_value);
354 353
                   }
@@ -363,7 +362,9 @@  discard block
 block discarded – undo
363 362
     
364 363
     protected function _isAssoc(array $arr)
365 364
     {
366
-        if (array() === $arr) return false;
365
+        if (array() === $arr) {
366
+            return false;
367
+        }
367 368
         return array_keys($arr) !== range(0, count($arr) - 1);
368 369
     }
369 370
 
Please login to merge, or discard this patch.