@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public function register() |
23 | 23 | { |
24 | - $this->getContainer()->share('Monolog\Logger', function () { |
|
24 | + $this->getContainer()->share('Monolog\Logger', function() { |
|
25 | 25 | $log = new Logger('app'); |
26 | 26 | |
27 | 27 | $config = $this->getContainer()->get('config'); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | $log->pushHandler( |
42 | - new StreamHandler(__DIR__ . '/../../logs/app.log', Logger::DEBUG) |
|
42 | + new StreamHandler(__DIR__.'/../../logs/app.log', Logger::DEBUG) |
|
43 | 43 | ); |
44 | 44 | |
45 | 45 | return $log; |
@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | public function register() |
21 | 21 | { |
22 | - $this->getContainer()->add('GuzzleHttp\Client', function () { |
|
22 | + $this->getContainer()->add('GuzzleHttp\Client', function() { |
|
23 | 23 | return new Client([ |
24 | 24 | 'timeout' => 10.0 |
25 | 25 | ]); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $missing = 0; |
41 | 41 | $max = $result->ResultID; |
42 | 42 | |
43 | - while($count < $max) { |
|
43 | + while ($count < $max) { |
|
44 | 44 | $count++; |
45 | 45 | |
46 | 46 | $per = round(($count / $max) * 100, 2); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | function convert($size) { |
4 | - $unit=array('B','KB','MB','GB','TB','PB'); |
|
5 | - return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i]; |
|
4 | + $unit = array('B', 'KB', 'MB', 'GB', 'TB', 'PB'); |
|
5 | + return @round($size / pow(1024, ($i = floor(log($size, 1024)))), 2).' '.$unit[$i]; |
|
6 | 6 | } |
@@ -83,7 +83,7 @@ |
||
83 | 83 | |
84 | 84 | $data = []; |
85 | 85 | |
86 | - foreach($config['servers'] as $server) { |
|
86 | + foreach ($config['servers'] as $server) { |
|
87 | 87 | $key = "ps2alerts:api:leaderboards:status:{$server}"; |
88 | 88 | |
89 | 89 | if ($redis->exists($key)) { |
@@ -22,6 +22,6 @@ |
||
22 | 22 | public function __construct( |
23 | 23 | Manager $fractal |
24 | 24 | ) { |
25 | - $this->fractal = $fractal; |
|
25 | + $this->fractal = $fractal; |
|
26 | 26 | } |
27 | 27 | } |
@@ -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 |