@@ -3,7 +3,7 @@ |
||
| 3 | 3 | $container = new League\Container\Container; |
| 4 | 4 | |
| 5 | 5 | // Register the request object singleton to be used later in the request cyncle |
| 6 | -$container->singleton('Symfony\Component\HttpFoundation\Request', function () { |
|
| 6 | +$container->singleton('Symfony\Component\HttpFoundation\Request', function() { |
|
| 7 | 7 | return Symfony\Component\HttpFoundation\Request::createFromGlobals(); |
| 8 | 8 | }); |
| 9 | 9 | |
@@ -18,22 +18,22 @@ |
||
| 18 | 18 | |
| 19 | 19 | // Inflectors |
| 20 | 20 | $container->inflector('Ps2alerts\Api\Contract\ConfigAwareInterface') |
| 21 | - ->invokeMethod('setConfig', ['config']); |
|
| 21 | + ->invokeMethod('setConfig', ['config']); |
|
| 22 | 22 | $container->inflector('Ps2alerts\Api\Contract\DatabaseAwareInterface') |
| 23 | - ->invokeMethod('setDatabaseDriver', ['Database']) |
|
| 24 | - ->invokeMethod('setDatabaseDataDriver', ['Database\Data']); |
|
| 23 | + ->invokeMethod('setDatabaseDriver', ['Database']) |
|
| 24 | + ->invokeMethod('setDatabaseDataDriver', ['Database\Data']); |
|
| 25 | 25 | $container->inflector('Ps2alerts\Api\Contract\LogAwareInterface') |
| 26 | - ->invokeMethod('setLogDriver', ['Monolog\Logger']); |
|
| 26 | + ->invokeMethod('setLogDriver', ['Monolog\Logger']); |
|
| 27 | 27 | $container->inflector('Ps2alerts\Api\Contract\TemplateAwareInterface') |
| 28 | - ->invokeMethod('setTemplateDriver', ['Twig_Environment']); |
|
| 28 | + ->invokeMethod('setTemplateDriver', ['Twig_Environment']); |
|
| 29 | 29 | $container->inflector('Ps2alerts\Api\Contract\RedisAwareInterface') |
| 30 | - ->invokeMethod('setRedisDriver', ['redis']); |
|
| 30 | + ->invokeMethod('setRedisDriver', ['redis']); |
|
| 31 | 31 | $container->inflector('Ps2alerts\Api\Contract\UuidAwareInterface') |
| 32 | - ->invokeMethod('setUuidDriver', ['Ramsey\Uuid\Uuid']); |
|
| 32 | + ->invokeMethod('setUuidDriver', ['Ramsey\Uuid\Uuid']); |
|
| 33 | 33 | |
| 34 | 34 | |
| 35 | 35 | // Container Inflector |
| 36 | 36 | $container->inflector('League\Container\ContainerAwareInterface') |
| 37 | - ->invokeMethod('setContainer', [$container]); |
|
| 37 | + ->invokeMethod('setContainer', [$container]); |
|
| 38 | 38 | |
| 39 | 39 | return $container; |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function register() |
| 20 | 20 | { |
| 21 | - $this->getContainer()->singleton('config', function () { |
|
| 21 | + $this->getContainer()->singleton('config', function() { |
|
| 22 | 22 | return include __DIR__ . '/../../config/config.php'; |
| 23 | 23 | }); |
| 24 | 24 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function register() |
| 25 | 25 | { |
| 26 | - $this->getContainer()->singleton('redis', function () { |
|
| 26 | + $this->getContainer()->singleton('redis', function() { |
|
| 27 | 27 | $redisConfig = $this->getContainer()->get('config')['redis']; |
| 28 | 28 | |
| 29 | 29 | $client = new Client([ |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function register() |
| 22 | 22 | { |
| 23 | - $this->getContainer()->singleton('Monolog\Logger', function () { |
|
| 23 | + $this->getContainer()->singleton('Monolog\Logger', function() { |
|
| 24 | 24 | $log = new Logger('app'); |
| 25 | 25 | $log->pushHandler( |
| 26 | 26 | new StreamHandler(__DIR__ . '/../../logs/app.log', Logger::DEBUG) |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | public function register() |
| 21 | 21 | { |
| 22 | - $this->getContainer()->add('Ramsey\Uuid\Uuid', function () { |
|
| 22 | + $this->getContainer()->add('Ramsey\Uuid\Uuid', function() { |
|
| 23 | 23 | $uuid = Uuid::Uuid4(); |
| 24 | 24 | return $uuid; |
| 25 | 25 | }); |
@@ -272,7 +272,7 @@ |
||
| 272 | 272 | { |
| 273 | 273 | $queryString = $request->query->get('embed'); |
| 274 | 274 | |
| 275 | - if (! empty($queryString)) { |
|
| 275 | + if (!empty($queryString)) { |
|
| 276 | 276 | $this->fractal->parseIncludes($request->query->get('embed')); |
| 277 | 277 | } |
| 278 | 278 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $key = $this->returnKeyType($keyType); |
| 90 | 90 | |
| 91 | 91 | $query->cols(['*']) |
| 92 | - ->where("`{$key}` = '{$id}'"); |
|
| 92 | + ->where("`{$key}` = '{$id}'"); |
|
| 93 | 93 | |
| 94 | 94 | return $this->fireStatementAndReturn($query, true); |
| 95 | 95 | } |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $key = $this->returnKeyType($keyType); |
| 108 | 108 | |
| 109 | 109 | $query->cols(['*']) |
| 110 | - ->where("`{$key}` = '{$id}'"); |
|
| 110 | + ->where("`{$key}` = '{$id}'"); |
|
| 111 | 111 | |
| 112 | 112 | return $this->fireStatementAndReturn($query); |
| 113 | 113 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | ]; |
| 33 | 33 | |
| 34 | 34 | // Register the singleton with the container |
| 35 | - $this->getContainer()->singleton('Twig_Environment', function () use ($globals, $config) { |
|
| 35 | + $this->getContainer()->singleton('Twig_Environment', function() use ($globals, $config) { |
|
| 36 | 36 | |
| 37 | 37 | $cache = false; |
| 38 | 38 | $debug = true; |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | public function register() |
| 21 | 21 | { |
| 22 | - $this->getContainer()->singleton('Database', function () { |
|
| 22 | + $this->getContainer()->singleton('Database', function() { |
|
| 23 | 23 | $config = $this->getContainer()->get('config')['database']; |
| 24 | 24 | |
| 25 | 25 | $pdo = new ExtendedPdo( |