@@ -103,11 +103,11 @@ discard block |
||
| 103 | 103 | $limit = (int) $_GET['limit']; |
| 104 | 104 | |
| 105 | 105 | // Set defaults if not supplied |
| 106 | - if (empty($offset) || ! is_numeric($offset)) { |
|
| 106 | + if (empty($offset) || !is_numeric($offset)) { |
|
| 107 | 107 | $offset = 0; |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | - if (empty($limit) || ! is_numeric($limit)) { |
|
| 110 | + if (empty($limit) || !is_numeric($limit)) { |
|
| 111 | 111 | $limit = 50; |
| 112 | 112 | } |
| 113 | 113 | |
@@ -173,11 +173,11 @@ discard block |
||
| 173 | 173 | $limit = (int) $_GET['limit']; |
| 174 | 174 | |
| 175 | 175 | // Set defaults if not supplied |
| 176 | - if (empty($offset) || ! is_numeric($offset)) { |
|
| 176 | + if (empty($offset) || !is_numeric($offset)) { |
|
| 177 | 177 | $offset = 0; |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - if (empty($limit) || ! is_numeric($limit)) { |
|
| 180 | + if (empty($limit) || !is_numeric($limit)) { |
|
| 181 | 181 | $limit = 50; |
| 182 | 182 | } |
| 183 | 183 | |
@@ -1,12 +1,12 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -include __DIR__ . '/../vendor/autoload.php'; |
|
| 3 | +include __DIR__.'/../vendor/autoload.php'; |
|
| 4 | 4 | |
| 5 | 5 | use League\Route\Http\Exception\NotFoundException; |
| 6 | 6 | |
| 7 | 7 | // ENV loading |
| 8 | 8 | josegonzalez\Dotenv\Loader::load([ |
| 9 | - 'filepath' => __DIR__ . '/../.env', |
|
| 9 | + 'filepath' => __DIR__.'/../.env', |
|
| 10 | 10 | 'toEnv' => true |
| 11 | 11 | ]); |
| 12 | 12 | |
@@ -21,10 +21,10 @@ discard block |
||
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | // Container |
| 24 | -$container = include __DIR__ . '/../src/container.php'; |
|
| 24 | +$container = include __DIR__.'/../src/container.php'; |
|
| 25 | 25 | |
| 26 | 26 | // Routes |
| 27 | -$router = include __DIR__ . '/../src/routes.php'; |
|
| 27 | +$router = include __DIR__.'/../src/routes.php'; |
|
| 28 | 28 | |
| 29 | 29 | // FIRE!!! |
| 30 | 30 | try { |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | } catch (\Exception $e) { |
| 45 | 45 | $response = $container->get('Zend\Diactoros\Response'); |
| 46 | 46 | $response->getBody()->write( |
| 47 | - 'An error occured! ' . $e->getMessage() |
|
| 47 | + 'An error occured! '.$e->getMessage() |
|
| 48 | 48 | ); |
| 49 | 49 | |
| 50 | 50 | $logger = $container->get('Monolog\Logger'); |
@@ -9,15 +9,15 @@ |
||
| 9 | 9 | use Ps2alerts\Api\Command\TestCommand; |
| 10 | 10 | use Symfony\Component\Console\Application; |
| 11 | 11 | |
| 12 | -require __DIR__ . '/../vendor/autoload.php'; |
|
| 12 | +require __DIR__.'/../vendor/autoload.php'; |
|
| 13 | 13 | |
| 14 | 14 | // ENV loading |
| 15 | 15 | josegonzalez\Dotenv\Loader::load([ |
| 16 | - 'filepath' => __DIR__ . '/../.env', |
|
| 16 | + 'filepath' => __DIR__.'/../.env', |
|
| 17 | 17 | 'toEnv' => true |
| 18 | 18 | ]); |
| 19 | 19 | |
| 20 | -include __DIR__ . '/Command/CommandsCommon.php'; |
|
| 20 | +include __DIR__.'/Command/CommandsCommon.php'; |
|
| 21 | 21 | |
| 22 | 22 | $application = new Application(); |
| 23 | 23 | // List commands here |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | |
| 12 | 12 | protected function configure() |
| 13 | 13 | { |
| 14 | - $container = include __DIR__ . '/../container.php'; |
|
| 14 | + $container = include __DIR__.'/../container.php'; |
|
| 15 | 15 | |
| 16 | 16 | $this->container = $container; |
| 17 | 17 | $this->auraFactory = $container->get('Ps2alerts\Api\Factory\AuraFactory'); |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | $query->where('playerServer', $server); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - $query->orderBy([$metric . ' DESC']); |
|
| 80 | + $query->orderBy([$metric.' DESC']); |
|
| 81 | 81 | $query->limit($limit); |
| 82 | 82 | $query->offset($count); |
| 83 | 83 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - if (! isset($field)) { |
|
| 87 | + if (!isset($field)) { |
|
| 88 | 88 | return $this->errorWrongArgs('Field wasn\'t provided and is required.'); |
| 89 | 89 | } |
| 90 | 90 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | // Gets outfit details |
| 115 | 115 | for ($i = 0; $i < $count; $i++) { |
| 116 | - if (! empty($players[$i]['playerOutfit'])) { |
|
| 116 | + if (!empty($players[$i]['playerOutfit'])) { |
|
| 117 | 117 | // Gets outfit details |
| 118 | 118 | try { |
| 119 | 119 | $outfit = $this->dataEndpoint->getOutfit($players[$i]['playerOutfit']); |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - if (! isset($field)) { |
|
| 177 | + if (!isset($field)) { |
|
| 178 | 178 | return $this->errorWrongArgs('Field wasn\'t provided and is required.'); |
| 179 | 179 | } |
| 180 | 180 | |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | } |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | - if (! isset($field)) { |
|
| 237 | + if (!isset($field)) { |
|
| 238 | 238 | return $this->errorWrongArgs('Field wasn\'t provided and is required.'); |
| 239 | 239 | } |
| 240 | 240 | |
@@ -276,19 +276,19 @@ discard block |
||
| 276 | 276 | public function validateRequestVars() |
| 277 | 277 | { |
| 278 | 278 | try { |
| 279 | - if (! empty($_GET['field'])) { |
|
| 279 | + if (!empty($_GET['field'])) { |
|
| 280 | 280 | $this->parseField($_GET['field']); |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | - if (! empty($_GET['server'])) { |
|
| 283 | + if (!empty($_GET['server'])) { |
|
| 284 | 284 | $this->parseServer($_GET['server']); |
| 285 | 285 | } |
| 286 | 286 | |
| 287 | - if (! empty($_GET['limit'])) { |
|
| 287 | + if (!empty($_GET['limit'])) { |
|
| 288 | 288 | $this->parseOffset($_GET['limit']); |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | - if (! empty($_GET['offset'])) { |
|
| 291 | + if (!empty($_GET['offset'])) { |
|
| 292 | 292 | $this->parseOffset($_GET['offset']); |
| 293 | 293 | } |
| 294 | 294 | } catch (InvalidArgumentException $e) { |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | 'captures' |
| 315 | 315 | ]; |
| 316 | 316 | |
| 317 | - if (! empty($field) && in_array($field, $validFields)) { |
|
| 317 | + if (!empty($field) && in_array($field, $validFields)) { |
|
| 318 | 318 | return $field; |
| 319 | 319 | } |
| 320 | 320 | |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | unset($validServers[$key]); |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | - if (! empty($server) && in_array($server, $validServers)) { |
|
| 338 | + if (!empty($server) && in_array($server, $validServers)) { |
|
| 339 | 339 | return $server; |
| 340 | 340 | } |
| 341 | 341 | |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | */ |
| 350 | 350 | public function parseLimit($limit) |
| 351 | 351 | { |
| 352 | - if (! isset($limit) && ! is_numeric($limit)) { |
|
| 352 | + if (!isset($limit) && !is_numeric($limit)) { |
|
| 353 | 353 | throw new InvalidArgumentException("Limit needs to be in numerical format."); |
| 354 | 354 | } |
| 355 | 355 | |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | */ |
| 362 | 362 | public function parseOffset($offset) |
| 363 | 363 | { |
| 364 | - if (! isset($offset) && ! is_numeric($offset)) { |
|
| 364 | + if (!isset($offset) && !is_numeric($offset)) { |
|
| 365 | 365 | throw new InvalidArgumentException("Offset needs to be in numerical format."); |
| 366 | 366 | } |
| 367 | 367 | |