@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function register() |
| 20 | 20 | { |
| 21 | - $this->getContainer()->share('config', function () { |
|
| 21 | + $this->getContainer()->share('config', function() { |
|
| 22 | 22 | return [ |
| 23 | 23 | 'environment' => $_ENV['ENV'], |
| 24 | 24 | 'base_url' => $_ENV['BASE_URL'], |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | public function register() |
| 25 | 25 | { |
| 26 | - $this->getContainer()->share('Database', function () { |
|
| 26 | + $this->getContainer()->share('Database', function() { |
|
| 27 | 27 | $config = $this->getContainer()->get('config')['database']; |
| 28 | 28 | |
| 29 | 29 | $pdo = new ExtendedPdo( |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | return $pdo; |
| 36 | 36 | }); |
| 37 | 37 | |
| 38 | - $this->getContainer()->share('Database\Data', function () { |
|
| 38 | + $this->getContainer()->share('Database\Data', function() { |
|
| 39 | 39 | $config = $this->getContainer()->get('config')['database_data']; |
| 40 | 40 | |
| 41 | 41 | $pdo = new ExtendedPdo( |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | return $pdo; |
| 48 | 48 | }); |
| 49 | 49 | |
| 50 | - $this->getContainer()->share('Database\Archive', function () { |
|
| 50 | + $this->getContainer()->share('Database\Archive', function() { |
|
| 51 | 51 | $config = $this->getContainer()->get('config')['database_archive']; |
| 52 | 52 | |
| 53 | 53 | $pdo = new ExtendedPdo( |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | return $pdo; |
| 60 | 60 | }); |
| 61 | 61 | |
| 62 | - $this->getContainer()->add('Aura\SqlQuery\QueryFactory', function () { |
|
| 62 | + $this->getContainer()->add('Aura\SqlQuery\QueryFactory', function() { |
|
| 63 | 63 | return new QueryFactory('mysql'); |
| 64 | 64 | }); |
| 65 | 65 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | public function register() |
| 25 | 25 | { |
| 26 | - $this->getContainer()->add('redis', function () { |
|
| 26 | + $this->getContainer()->add('redis', function() { |
|
| 27 | 27 | $redisConfig = $this->getContainer()->get('config')['redis']; |
| 28 | 28 | |
| 29 | 29 | $args = [ |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | 'scheme' => 'tcp', |
| 34 | 34 | ]; |
| 35 | 35 | |
| 36 | - if (! empty($redisConfig['pass'])) { |
|
| 36 | + if (!empty($redisConfig['pass'])) { |
|
| 37 | 37 | $args['password'] = $redisConfig['pass']; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | public function register() |
| 21 | 21 | { |
| 22 | - $this->getContainer()->share('League\Fractal\Manager', function () { |
|
| 22 | + $this->getContainer()->share('League\Fractal\Manager', function() { |
|
| 23 | 23 | return new Manager; |
| 24 | 24 | }); |
| 25 | 25 | } |
@@ -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); |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Ps2alerts\Api\Command\BaseCommand; |
| 6 | 6 | use Ps2alerts\Api\Repository\AlertRepository; |
| 7 | -use Symfony\Component\Console\Input\InputArgument; |
|
| 8 | 7 | use Symfony\Component\Console\Input\InputInterface; |
| 9 | 8 | use Symfony\Component\Console\Output\OutputInterface; |
| 10 | 9 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | { |
| 18 | 18 | parent::configure(); // See BaseCommand.php |
| 19 | 19 | $this->setName('DeleteMissingAlerts') |
| 20 | - ->setDescription('Deletes all missing alerts'); |
|
| 20 | + ->setDescription('Deletes all missing alerts'); |
|
| 21 | 21 | |
| 22 | 22 | $this->alertRepo = $this->container->get('Ps2alerts\Api\Repository\AlertRepository'); |
| 23 | 23 | $this->alertProcessor = new DeleteAlertCommand(); |
@@ -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 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | /** |
| 12 | 12 | * Construct |
| 13 | 13 | * |
| 14 | - */ |
|
| 14 | + */ |
|
| 15 | 15 | public function __construct() |
| 16 | 16 | { |
| 17 | 17 | |