@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use League\Route\Http\JsonResponse as Response; |
6 | 6 | use Ps2alerts\Api\Controller\EndpointBaseController; |
7 | -use Ps2alerts\Api\QueryObjects\QueryObject; |
|
8 | 7 | use Ps2alerts\Api\Loader\ResultLoader; |
9 | 8 | use Symfony\Component\HttpFoundation\Request; |
10 | 9 |
@@ -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 |
@@ -15,13 +15,13 @@ discard block |
||
15 | 15 | |
16 | 16 | // Inflectors |
17 | 17 | $container->inflector('Ps2alerts\Api\Contract\ConfigAwareInterface') |
18 | - ->invokeMethod('setConfig', ['config']); |
|
18 | + ->invokeMethod('setConfig', ['config']); |
|
19 | 19 | $container->inflector('Ps2alerts\Api\Contract\DatabaseAwareInterface') |
20 | - ->invokeMethod('setDatabaseDriver', ['Aura\Sql']); |
|
20 | + ->invokeMethod('setDatabaseDriver', ['Aura\Sql']); |
|
21 | 21 | $container->inflector('Ps2alerts\Api\Contract\TemplateAwareInterface') |
22 | - ->invokeMethod('setTemplateDriver', ['Twig_Environment']); |
|
22 | + ->invokeMethod('setTemplateDriver', ['Twig_Environment']); |
|
23 | 23 | $container->inflector('Ps2alerts\Api\Contract\RedisAwareInterface') |
24 | - ->invokeMethod('setRedisDriver', ['redis']); |
|
24 | + ->invokeMethod('setRedisDriver', ['redis']); |
|
25 | 25 | |
26 | 26 | // Repositories |
27 | 27 | $container->add('Ps2alerts\Api\Repository\ResultRepository'); |
@@ -32,27 +32,27 @@ discard block |
||
32 | 32 | |
33 | 33 | // Loaders |
34 | 34 | $container->add('Ps2alerts\Api\Loader\Metrics\MapMetricsLoader') |
35 | - ->withArgument('Ps2alerts\Api\Repository\Metrics\MapRepository'); |
|
35 | + ->withArgument('Ps2alerts\Api\Repository\Metrics\MapRepository'); |
|
36 | 36 | $container->add('Ps2alerts\Api\Loader\Metrics\MapInitialMetricsLoader') |
37 | - ->withArgument('Ps2alerts\Api\Repository\Metrics\MapInitialRepository'); |
|
37 | + ->withArgument('Ps2alerts\Api\Repository\Metrics\MapInitialRepository'); |
|
38 | 38 | $container->add('Ps2alerts\Api\Loader\Metrics\OutfitMetricsLoader') |
39 | - ->withArgument('Ps2alerts\Api\Repository\Metrics\OutfitRepository'); |
|
39 | + ->withArgument('Ps2alerts\Api\Repository\Metrics\OutfitRepository'); |
|
40 | 40 | $container->add('Ps2alerts\Api\Loader\ResultLoader') |
41 | - ->withArgument('Ps2alerts\Api\Repository\ResultRepository'); |
|
41 | + ->withArgument('Ps2alerts\Api\Repository\ResultRepository'); |
|
42 | 42 | |
43 | 43 | // Endpoint Injectors |
44 | 44 | $container->add('Ps2alerts\Api\Controller\Alerts\ResultsEndpointController') |
45 | - ->withArgument('Ps2alerts\Api\Loader\ResultLoader'); |
|
45 | + ->withArgument('Ps2alerts\Api\Loader\ResultLoader'); |
|
46 | 46 | // Metrics Endpoints |
47 | 47 | $container->add('Ps2alerts\Api\Controller\Metrics\MapMetricsEndpoint') |
48 | - ->withArgument('Ps2alerts\Api\Loader\Metrics\MapMetricsLoader'); |
|
48 | + ->withArgument('Ps2alerts\Api\Loader\Metrics\MapMetricsLoader'); |
|
49 | 49 | $container->add('Ps2alerts\Api\Controller\Metrics\MapInitialMetricsEndpoint') |
50 | - ->withArgument('Ps2alerts\Api\Loader\Metrics\MapInitialMetricsLoader'); |
|
50 | + ->withArgument('Ps2alerts\Api\Loader\Metrics\MapInitialMetricsLoader'); |
|
51 | 51 | $container->add('Ps2alerts\Api\Controller\Metrics\OutfitMetricsEndpoint') |
52 | - ->withArgument('Ps2alerts\Api\Loader\Metrics\OutfitMetricsLoader'); |
|
52 | + ->withArgument('Ps2alerts\Api\Loader\Metrics\OutfitMetricsLoader'); |
|
53 | 53 | |
54 | 54 | // Container Inflector |
55 | 55 | $container->inflector('League\Container\ContainerAwareInterface') |
56 | - ->invokeMethod('setContainer', [$container]); |
|
56 | + ->invokeMethod('setContainer', [$container]); |
|
57 | 57 | |
58 | 58 | return $container; |
@@ -32,13 +32,13 @@ |
||
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; |
39 | 39 | |
40 | 40 | if ($config['environment'] === "production" || $config['environment'] === "staging") { |
41 | - $cache = __DIR__ .'/../../cache'; |
|
41 | + $cache = __DIR__ . '/../../cache'; |
|
42 | 42 | $debug = false; |
43 | 43 | } |
44 | 44 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | public function register() |
21 | 21 | { |
22 | - $this->getContainer()->singleton('Aura\Sql', function () { |
|
22 | + $this->getContainer()->singleton('Aura\Sql', function() { |
|
23 | 23 | $config = $this->getContainer()->get('config')['database']; |
24 | 24 | |
25 | 25 | $pdo = new ExtendedPdo( |
@@ -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([ |
@@ -13,7 +13,7 @@ |
||
13 | 13 | /** |
14 | 14 | * Returns a single entry |
15 | 15 | * |
16 | - * @param Symfony\Component\HttpFoundation\Request $request |
|
16 | + * @param Request $request |
|
17 | 17 | * @param array $args |
18 | 18 | * |
19 | 19 | * @return \League\Route\Http\JsonResponse |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use League\Route\Http\JsonResponse as Response; |
6 | 6 | use Ps2alerts\Api\Controller\EndpointBaseController; |
7 | -use Ps2alerts\Api\QueryObjects\QueryObject; |
|
8 | 7 | use Ps2alerts\Api\Loader\ResultLoader; |
9 | 8 | use Symfony\Component\HttpFoundation\Request; |
10 | 9 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | /** |
13 | 13 | * Construct |
14 | 14 | * |
15 | - * @param \Ps2alerts\Api\Loader\Metrics\OutfitTotalsMetricsLoader $loader |
|
15 | + * @param OutfitTotalsMetricsLoader $loader |
|
16 | 16 | */ |
17 | 17 | public function __construct(OutfitTotalsMetricsLoader $loader) |
18 | 18 | { |
@@ -72,7 +72,6 @@ discard block |
||
72 | 72 | /** |
73 | 73 | * Gets the Cache namespace key for Redis |
74 | 74 | * |
75 | - * @param string $string |
|
76 | 75 | */ |
77 | 76 | public function getCacheNamespace() |
78 | 77 | { |
@@ -145,7 +144,7 @@ discard block |
||
145 | 144 | * Sets JSON encoded value within Redis with an expiry in seconds |
146 | 145 | * |
147 | 146 | * @param string $key |
148 | - * @param mixed $value Data to encode into JSON and store |
|
147 | + * @param string $value Data to encode into JSON and store |
|
149 | 148 | * @param integer $expires Cache expiry time in seconds |
150 | 149 | */ |
151 | 150 | public function setExpireKey($key, $value, $expires) |
@@ -10,10 +10,10 @@ |
||
10 | 10 | use RedisAwareTrait; |
11 | 11 | |
12 | 12 | /** |
13 | - * Flag whether or not the result is allowed to be cached |
|
14 | - * |
|
15 | - * @var boolean |
|
16 | - */ |
|
13 | + * Flag whether or not the result is allowed to be cached |
|
14 | + * |
|
15 | + * @var boolean |
|
16 | + */ |
|
17 | 17 | |
18 | 18 | protected $cacheable = true; |
19 | 19 | /** |