@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | $query->cols([$sql]); |
| 74 | 74 | |
| 75 | - if (! empty($dates)) { |
|
| 75 | + if (!empty($dates)) { |
|
| 76 | 76 | $this->addDateRangeWhereClause($dates, $query, true); |
| 77 | 77 | } |
| 78 | 78 | |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | $query->cols([$sql]); |
| 179 | 179 | |
| 180 | 180 | $query->where('ResultDateTime IS NOT NULL'); |
| 181 | - if (! empty($dates)) { |
|
| 181 | + if (!empty($dates)) { |
|
| 182 | 182 | $this->addDateRangeWhereClause($dates, $query, true); |
| 183 | 183 | } |
| 184 | 184 | $query->groupBy(['dateIndex']); |
@@ -203,11 +203,11 @@ discard block |
||
| 203 | 203 | $factionAbv = strtoupper($faction); |
| 204 | 204 | |
| 205 | 205 | $sql .= "SUM(CASE WHEN `ResultWinner` = '{$factionAbv}' "; |
| 206 | - if (! empty($server)) { |
|
| 206 | + if (!empty($server)) { |
|
| 207 | 207 | $sql .= "AND `ResultServer` IN ({$server}) "; |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | - if (! empty($zones)) { |
|
| 210 | + if (!empty($zones)) { |
|
| 211 | 211 | $sql .= "AND `ResultAlertCont` IN ({$zones}) "; |
| 212 | 212 | } |
| 213 | 213 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | $this->parsePlayerName($args['term']); |
| 48 | 48 | $players = $this->searchForPlayer($args['term']); |
| 49 | 49 | |
| 50 | - if (! empty($players)) { |
|
| 50 | + if (!empty($players)) { |
|
| 51 | 51 | return $this->respond( |
| 52 | 52 | 'collection', |
| 53 | 53 | $players, |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | $this->parseOutfitName($name); |
| 75 | 75 | |
| 76 | - if (! empty($outfits)) { |
|
| 76 | + if (!empty($outfits)) { |
|
| 77 | 77 | return $this->respond( |
| 78 | 78 | 'collection', |
| 79 | 79 | $outfits, |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | return $this->respondWithError('Player ID cannot be longer than 19 characters.', self::CODE_WRONG_ARGS); |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - if (! is_numeric($id)) { |
|
| 189 | + if (!is_numeric($id)) { |
|
| 190 | 190 | return $this->respondWithError('Player ID must be numeric.', self::CODE_WRONG_ARGS); |
| 191 | 191 | } |
| 192 | 192 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | // Now return the character the outfit injected |
| 78 | - if (! empty($character['data']['outfit'])) { |
|
| 78 | + if (!empty($character['data']['outfit'])) { |
|
| 79 | 79 | try { |
| 80 | 80 | $outfit = $this->getOutfit($character['data']['outfit']); |
| 81 | 81 | } catch (CensusErrorException $e) { |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | // First, check if we have the character in Redis |
| 138 | 138 | $redisCheck = $this->getRedisUtility()->checkRedis('cache', 'character', $id); |
| 139 | 139 | |
| 140 | - if (! empty($redisCheck)) { |
|
| 140 | + if (!empty($redisCheck)) { |
|
| 141 | 141 | return $redisCheck; |
| 142 | 142 | } |
| 143 | 143 | |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | // First, check if we have the outfit in Redis |
| 187 | 187 | $redisCheck = $this->getRedisUtility()->checkRedis('cache', 'outfit', $id); |
| 188 | 188 | |
| 189 | - if (! empty($redisCheck)) { |
|
| 189 | + if (!empty($redisCheck)) { |
|
| 190 | 190 | return $redisCheck; |
| 191 | 191 | } |
| 192 | 192 | |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | ]; |
| 246 | 246 | |
| 247 | 247 | // Loop through each environment and get the first result |
| 248 | - foreach($environments as $env) { |
|
| 248 | + foreach ($environments as $env) { |
|
| 249 | 249 | $url = "https://census.daybreakgames.com/s:{$config['census_service_id']}/get/{$env}/{$endpoint}"; |
| 250 | 250 | |
| 251 | 251 | $req = $guzzle->request('GET', $url); |
@@ -29,12 +29,12 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | public function validateTimeDifference($dates, int $maxDiff) |
| 31 | 31 | { |
| 32 | - if (! is_array($dates)) { |
|
| 32 | + if (!is_array($dates)) { |
|
| 33 | 33 | $dates = str_replace('\'', '', $dates); // Remove escaping quotes |
| 34 | 34 | $dates = explode(',', $dates); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - if (! is_array) { |
|
| 37 | + if (!is_array) { |
|
| 38 | 38 | throw new InvalidArgumentException('Somehow validateTimeDifference couldn\'t make a date array.'); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | |
| 12 | 12 | protected $flag = 'NOT-USED'; |
| 13 | 13 | protected $misses = 0; |
| 14 | - protected $hits = 0; |
|
| 14 | + protected $hits = 0; |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * Sets the Redis Missed Flag |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | $field = $this->getField($_GET['field']); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - if (! isset($field)) { |
|
| 43 | + if (!isset($field)) { |
|
| 44 | 44 | return $this->respondWithError('Field wasn\'t provided and is required.', self::CODE_WRONG_ARGS); |
| 45 | 45 | } |
| 46 | 46 | |