@@ -31,7 +31,7 @@ |
||
31 | 31 | * |
32 | 32 | * @param \Ps2alerts\Api\Repository\AlertRepository $repository |
33 | 33 | * @param \Ps2alerts\Api\Loader\Metrics\MapMetricsLoader $mapLoader |
34 | - * @param \Ps2alerts\Api\Helper\DataFormatter $dataFormatter |
|
34 | + * @param DataFormatterHelper $dataFormatter |
|
35 | 35 | */ |
36 | 36 | public function __construct( |
37 | 37 | AlertRepository $repository, |
@@ -93,9 +93,9 @@ discard block |
||
93 | 93 | return $this->getFromRedis($masterRedisKey); |
94 | 94 | } |
95 | 95 | |
96 | - $servers = [1,10,13,17,25,1000,2000]; |
|
97 | - $zones = [2,4,6,8]; |
|
98 | - $factions = ['vs','nc','tr','draw']; |
|
96 | + $servers = [1, 10, 13, 17, 25, 1000, 2000]; |
|
97 | + $zones = [2, 4, 6, 8]; |
|
98 | + $factions = ['vs', 'nc', 'tr', 'draw']; |
|
99 | 99 | |
100 | 100 | $results = []; |
101 | 101 | $this->setCacheExpireTime(3600); // 1 Hour |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $maxDate = date('Y-m-d'); // Today unless set |
188 | 188 | |
189 | 189 | // If there is a minimum date set |
190 | - if (! empty($post['wheres']['morethan']['ResultEndTime'])) { |
|
190 | + if (!empty($post['wheres']['morethan']['ResultEndTime'])) { |
|
191 | 191 | if (is_integer($post['wheres']['morethan']['ResultEndTime'])) { |
192 | 192 | $minDate = date('Y-m-d', $post['wheres']['morethan']['ResultEndTime']); |
193 | 193 | } else { |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | } |
197 | 197 | |
198 | 198 | // If there is a maximum date set |
199 | - if (! empty($post['wheres']['lessthan']['ResultEndTime'])) { |
|
199 | + if (!empty($post['wheres']['lessthan']['ResultEndTime'])) { |
|
200 | 200 | if (is_integer($post['wheres']['lessthan']['ResultEndTime'])) { |
201 | 201 | $maxDate = date('Y-m-d', $post['wheres']['lessthan']['ResultEndTime']); |
202 | 202 | } else { |
@@ -254,11 +254,11 @@ discard block |
||
254 | 254 | $minDate = date('U', strtotime("-24 hours")); |
255 | 255 | $maxDate = date('U'); |
256 | 256 | |
257 | - if (! empty($post['minDate'])) { |
|
257 | + if (!empty($post['minDate'])) { |
|
258 | 258 | $minDate = date('U', $post['minDate']); |
259 | 259 | } |
260 | 260 | |
261 | - if (! empty($post['maxDate'])) { |
|
261 | + if (!empty($post['maxDate'])) { |
|
262 | 262 | $maxDate = date('U', $post['maxDate']); |
263 | 263 | } |
264 | 264 | |
@@ -274,14 +274,14 @@ discard block |
||
274 | 274 | 'value' => $maxDate |
275 | 275 | ]); |
276 | 276 | |
277 | - if (! empty($post['server'])) { |
|
277 | + if (!empty($post['server'])) { |
|
278 | 278 | $queryObject->addWhere([ |
279 | 279 | 'col' => 'ResultServer', |
280 | 280 | 'value' => $post['server'] |
281 | 281 | ]); |
282 | 282 | } |
283 | 283 | |
284 | - if (! empty($post['faction'])) { |
|
284 | + if (!empty($post['faction'])) { |
|
285 | 285 | $queryObject->addWhere([ |
286 | 286 | 'col' => 'ResultWinner', |
287 | 287 | 'value' => $post['faction'] |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | $queryObject->setOrderBy('result'); |
294 | 294 | $queryObject->setOrderByDirection('desc'); |
295 | 295 | |
296 | - if (! empty($post['orderBy'])) { |
|
296 | + if (!empty($post['orderBy'])) { |
|
297 | 297 | if ($post['orderBy'] === 'asc' || $post['orderBy'] === 'desc') { |
298 | 298 | $queryObject->setOrderByDirection($post['orderBy']); |
299 | 299 | } |
@@ -17,17 +17,17 @@ discard block |
||
17 | 17 | |
18 | 18 | // Inflectors |
19 | 19 | $container->inflector('Ps2alerts\Api\Contract\ConfigAwareInterface') |
20 | - ->invokeMethod('setConfig', ['config']); |
|
20 | + ->invokeMethod('setConfig', ['config']); |
|
21 | 21 | $container->inflector('Ps2alerts\Api\Contract\DatabaseAwareInterface') |
22 | - ->invokeMethod('setDatabaseDriver', ['Aura\Sql']); |
|
22 | + ->invokeMethod('setDatabaseDriver', ['Aura\Sql']); |
|
23 | 23 | $container->inflector('Ps2alerts\Api\Contract\LogAwareInterface') |
24 | - ->invokeMethod('setLogDriver', ['Monolog\Logger']); |
|
24 | + ->invokeMethod('setLogDriver', ['Monolog\Logger']); |
|
25 | 25 | $container->inflector('Ps2alerts\Api\Contract\TemplateAwareInterface') |
26 | - ->invokeMethod('setTemplateDriver', ['Twig_Environment']); |
|
26 | + ->invokeMethod('setTemplateDriver', ['Twig_Environment']); |
|
27 | 27 | $container->inflector('Ps2alerts\Api\Contract\RedisAwareInterface') |
28 | - ->invokeMethod('setRedisDriver', ['redis']); |
|
28 | + ->invokeMethod('setRedisDriver', ['redis']); |
|
29 | 29 | $container->inflector('Ps2alerts\Api\Contract\UuidAwareInterface') |
30 | - ->invokeMethod('setUuidDriver', ['Ramsey\Uuid\Uuid']); |
|
30 | + ->invokeMethod('setUuidDriver', ['Ramsey\Uuid\Uuid']); |
|
31 | 31 | |
32 | 32 | // Repositories |
33 | 33 | $container->add('Ps2alerts\Api\Repository\AlertRepository'); |
@@ -35,12 +35,12 @@ discard block |
||
35 | 35 | $container->add('Ps2alerts\Api\Helper\DataFormatterHelper'); |
36 | 36 | |
37 | 37 | $container->add('Ps2alerts\Api\Loader\Statistics\AlertStatisticsLoader') |
38 | - ->withArgument('Ps2alerts\Api\Repository\AlertRepository') |
|
39 | - ->withArgument('Ps2alerts\Api\Loader\Metrics\MapMetricsLoader') |
|
40 | - ->withArgument('Ps2alerts\Api\Helper\DataFormatterHelper'); |
|
38 | + ->withArgument('Ps2alerts\Api\Repository\AlertRepository') |
|
39 | + ->withArgument('Ps2alerts\Api\Loader\Metrics\MapMetricsLoader') |
|
40 | + ->withArgument('Ps2alerts\Api\Helper\DataFormatterHelper'); |
|
41 | 41 | |
42 | 42 | // Container Inflector |
43 | 43 | $container->inflector('League\Container\ContainerAwareInterface') |
44 | - ->invokeMethod('setContainer', [$container]); |
|
44 | + ->invokeMethod('setContainer', [$container]); |
|
45 | 45 | |
46 | 46 | return $container; |