@@ -1119,7 +1119,7 @@ |
||
| 1119 | 1119 | |
| 1120 | 1120 | $ac->setInodeUsed(intval($account['inodesused'])); |
| 1121 | 1121 | |
| 1122 | - if (! empty($account['has_backup'])) { |
|
| 1122 | + if (!empty($account['has_backup'])) { |
|
| 1123 | 1123 | $ac->setBackup((bool)$account['has_backup']); |
| 1124 | 1124 | } |
| 1125 | 1125 | |
@@ -107,12 +107,12 @@ |
||
| 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'] |
@@ -379,17 +379,17 @@ discard block |
||
| 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 |
||
| 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 | |
@@ -453,18 +453,18 @@ discard block |
||
| 453 | 453 | ]; |
| 454 | 454 | |
| 455 | 455 | $usersJson = []; |
| 456 | - foreach ($usernames as $username){ |
|
| 456 | + foreach ($usernames as $username) { |
|
| 457 | 457 | $usersJson[$username] = 1; |
| 458 | 458 | } |
| 459 | 459 | |
| 460 | 460 | $params['users_json'] = json_encode($usersJson); |
| 461 | 461 | |
| 462 | 462 | $result = $this->client->sendRequest("/json-api/forcepasswordchange", "GET", $params); |
| 463 | - if($result['metadata']['result'] === 0){ |
|
| 463 | + if ($result['metadata']['result'] === 0) { |
|
| 464 | 464 | throw new ClientExceptions($result['metadata']['reason']); |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | - if(!empty($result['data'])){ |
|
| 467 | + if (!empty($result['data'])) { |
|
| 468 | 468 | return $result['updated']; |
| 469 | 469 | } |
| 470 | 470 | |