@@ -108,7 +108,7 @@ |
||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | if ($response->getStatusCode() === 403) { |
| 111 | - if (! empty($data['cpanelresult']['error'])) { |
|
| 111 | + if (!empty($data['cpanelresult']['error'])) { |
|
| 112 | 112 | throw ClientExceptions::accessDenied( |
| 113 | 113 | $data['cpanelresult']['error'], |
| 114 | 114 | $data['cpanelresult']['data']['reason'] |
@@ -73,31 +73,31 @@ discard block |
||
| 73 | 73 | 'api.chunk.start' => $page * $limit |
| 74 | 74 | ]; |
| 75 | 75 | |
| 76 | - if (! empty($options['limit'])) { |
|
| 76 | + if (!empty($options['limit'])) { |
|
| 77 | 77 | $params['api.chunk.size'] = intval($options['limit']); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - if (! empty($options['page'])) { |
|
| 80 | + if (!empty($options['page'])) { |
|
| 81 | 81 | $params['api.chunk.start'] = intval($options['page']) * $params['api.chunk.size']; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - if (! empty($searchType) && ! in_array($searchType, ["domain", "owner", "user", "ip", "package"])) { |
|
| 84 | + if (!empty($searchType) && !in_array($searchType, ["domain", "owner", "user", "ip", "package"])) { |
|
| 85 | 85 | throw new \InvalidArgumentException("`searchType` must be one of these - domain, owner, user, ip, package"); |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - if (! empty($options['searchmethod']) && ! in_array($options['searchmethod'], ["exact", "regex"])) { |
|
| 88 | + if (!empty($options['searchmethod']) && !in_array($options['searchmethod'], ["exact", "regex"])) { |
|
| 89 | 89 | throw new \InvalidArgumentException("options[searchmethod] must be either `regex` or `exact`"); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - if (! empty($options['want'])) { |
|
| 92 | + if (!empty($options['want'])) { |
|
| 93 | 93 | $params['want'] = $options['want']; |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | - if (! empty($searchType)) { |
|
| 96 | + if (!empty($searchType)) { |
|
| 97 | 97 | $params['searchtype'] = $searchType; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - if (! empty($keyword)) { |
|
| 100 | + if (!empty($keyword)) { |
|
| 101 | 101 | $params['search'] = $keyword; |
| 102 | 102 | empty($searchType) ? $params['searchtype'] = "user" : null; |
| 103 | 103 | } |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | throw ClientExceptions::invalidArgument("You must provide either a username or a domain or both"); |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - if (! empty($user) && ! empty($domain)) { |
|
| 140 | + if (!empty($user) && !empty($domain)) { |
|
| 141 | 141 | throw ClientExceptions::invalidArgument( |
| 142 | 142 | "You must provide only one argument either user OR domain (not both)" |
| 143 | 143 | ); |
@@ -145,11 +145,11 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $params = []; |
| 147 | 147 | |
| 148 | - if (! empty($user)) { |
|
| 148 | + if (!empty($user)) { |
|
| 149 | 149 | $params['user'] = $user; |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | - if (! empty($domain)) { |
|
| 152 | + if (!empty($domain)) { |
|
| 153 | 153 | $params['domain'] = $domain; |
| 154 | 154 | } |
| 155 | 155 | |
@@ -160,11 +160,11 @@ discard block |
||
| 160 | 160 | |
| 161 | 161 | if ($result['status'] === 0) { |
| 162 | 162 | throw ClientExceptions::recordNotFound( |
| 163 | - ! empty($result['statusmsg']) ? $result['statusmsg'] : "Record not found" |
|
| 163 | + !empty($result['statusmsg']) ? $result['statusmsg'] : "Record not found" |
|
| 164 | 164 | ); |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | - if (! empty($result['acct']) && is_array($result['acct'])) { |
|
| 167 | + if (!empty($result['acct']) && is_array($result['acct'])) { |
|
| 168 | 168 | return Account::buildFromArray($result['acct'][0]); |
| 169 | 169 | } |
| 170 | 170 | |
@@ -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 | |