Passed
Push — master ( 82039d...77fef7 )
by Shaharia
01:39
created
src/WHMClient.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,12 +107,12 @@
 block discarded – undo
107 107
             $data = json_decode((string)$response->getBody(), true);
108 108
         }
109 109
 
110
-        if(array_key_exists("status", $data) && $data['status'] === 0){
110
+        if (array_key_exists("status", $data) && $data['status'] === 0) {
111 111
             throw ClientExceptions::accessDenied(!empty($data['statusmsg']) ? $data['statusmsg'] : null);
112 112
         }
113 113
 
114 114
         if ($response->getStatusCode() === 403) {
115
-            if (! empty($data['cpanelresult']['error'])) {
115
+            if (!empty($data['cpanelresult']['error'])) {
116 116
                 throw ClientExceptions::accessDenied(
117 117
                     $data['cpanelresult']['error'],
118 118
                     $data['cpanelresult']['data']['reason']
Please login to merge, or discard this patch.
src/WHM/Accounts.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -379,17 +379,17 @@  discard block
 block discarded – undo
379 379
         $params = ['domain' => $domain];
380 380
 
381 381
         $result = $this->client->sendRequest("/json-api/domainuserdata", "GET", $params);
382
-        if(empty($result)){
382
+        if (empty($result)) {
383 383
             return null;
384 384
         }
385 385
 
386
-        if($result['result'][0]['status'] === 0){
386
+        if ($result['result'][0]['status'] === 0) {
387 387
             throw new ClientExceptions($result['result'][0]['statusmsg']);
388 388
         }
389 389
 
390 390
         $userData = $result['userdata'];
391 391
         $domainUser = new DomainUser();
392
-        $domainUser->setHasCGI((bool) $userData['hascgi']);
392
+        $domainUser->setHasCGI((bool)$userData['hascgi']);
393 393
         $domainUser->setServerName($userData['servername']);
394 394
         $domainUser->setOwner($userData['owner']);
395 395
         $domainUser->setScriptAlias($userData['scriptalias']);
@@ -399,11 +399,11 @@  discard block
 block discarded – undo
399 399
         $domainUser->setGroup($userData['group']);
400 400
         $domainUser->setIpAddress($userData['ip']);
401 401
         $domainUser->setPort($userData['port']);
402
-        $domainUser->setPhpOpenBaseDirectoryProtect((bool) $userData['phpopenbasedirprotect']);
402
+        $domainUser->setPhpOpenBaseDirectoryProtect((bool)$userData['phpopenbasedirprotect']);
403 403
 
404
-        if($userData['usecanonicalname'] === "Off"){
404
+        if ($userData['usecanonicalname'] === "Off") {
405 405
             $domainUser->setUseCanonicalName(false);
406
-        }elseif($userData['usecanonicalname'] === "On"){
406
+        }elseif ($userData['usecanonicalname'] === "On") {
407 407
             $domainUser->setUseCanonicalName(true);
408 408
         }
409 409
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -403,7 +403,7 @@
 block discarded – undo
403 403
 
404 404
         if($userData['usecanonicalname'] === "Off"){
405 405
             $domainUser->setUseCanonicalName(false);
406
-        }elseif($userData['usecanonicalname'] === "On"){
406
+        } elseif($userData['usecanonicalname'] === "On"){
407 407
             $domainUser->setUseCanonicalName(true);
408 408
         }
409 409
 
Please login to merge, or discard this patch.