Passed
Push — master ( 4e0c53...f99e8b )
by Joe
02:44
created
src/Cpanel.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@  discard block
 block discarded – undo
27 27
         if ($format != "xml" && $format != "json" && $format != "yaml" && $format != "simplexml") {
28 28
             error_log("set_format requires that the format is xml, json, yaml or simplexml");
29 29
             return;
30
-        }
31
-        else {
30
+        } else {
32 31
             $this->format = $format;
33 32
         }
34 33
     }
@@ -59,8 +58,7 @@  discard block
 block discarded – undo
59 58
 			$result = $result[str_replace('.cgi', '', $function)];
60 59
 			$result = $this->format_result($result);			
61 60
 			return $result;
62
-        }
63
-        else {
61
+        } else {
64 62
             return $result;
65 63
         }
66 64
     }
@@ -88,8 +86,7 @@  discard block
 block discarded – undo
88 86
     private function validateID ($id) {
89 87
         if (preg_match("/^(L|P|G)?\d*$/", $id)) {
90 88
             return 1;
91
-        }
92
-        else {
89
+        } else {
93 90
             return 0;
94 91
         }
95 92
     }
@@ -273,11 +270,9 @@  discard block
 block discarded – undo
273 270
         $xmlObj = (array) $xmlObj;
274 271
         if (array_key_exists("packages", $xmlObj)) {
275 272
             $type = "packages";
276
-        }
277
-        else if (array_key_exists("groups", $xmlObj)) {
273
+        } else if (array_key_exists("groups", $xmlObj)) {
278 274
             $type = "groups";
279
-        }
280
-        else {
275
+        } else {
281 276
             error_log("cPanelLicensing::findKey with an object that is not groups or packages");
282 277
             return;
283 278
         }
Please login to merge, or discard this patch.