Completed
Push — staging ( 83f973...0db769 )
by Matthew
02:32
created
src/container.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,21 +17,21 @@
 block discarded – undo
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
 
33 33
 // Container Inflector
34 34
 $container->inflector('League\Container\ContainerAwareInterface')
35
-          ->invokeMethod('setContainer', [$container]);
35
+            ->invokeMethod('setContainer', [$container]);
36 36
 
37 37
 return $container;
Please login to merge, or discard this patch.
src/ServiceProvider/TemplateServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,13 +32,13 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/ServiceProvider/DatabaseServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
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(
Please login to merge, or discard this patch.
src/ServiceProvider/ConfigServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/ServiceProvider/RedisServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
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([
Please login to merge, or discard this patch.
src/ServiceProvider/LogServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
src/ServiceProvider/UuidServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
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
         });
Please login to merge, or discard this patch.
public/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     $response->setStatusCode(404)->setContent(
29 29
         $container->get('Twig_Environment')->render('404.html')
30 30
     );
31
-} catch(\Exception $e) {
31
+} catch (\Exception $e) {
32 32
     $response->setStatusCode(500)->setContent(
33 33
         'An error occured! ' . $e->getMessage()
34 34
     );
Please login to merge, or discard this patch.
src/Repository/AbstractEndpointRepository.php 4 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,7 +116,6 @@  discard block
 block discarded – undo
116 116
      * Reads all records based off a simple where statement
117 117
      *
118 118
      * @param  array $fields
119
-     * @param  string $value
120 119
      *
121 120
      * @return array
122 121
      */
@@ -136,8 +135,7 @@  discard block
 block discarded – undo
136 135
     /**
137 136
      * Reads the count of records based off a where statement
138 137
      *
139
-     * @param  array $field
140
-     * @param  string $value
138
+     * @param  array $fields
141 139
      *
142 140
      * @return array
143 141
      */
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
         $query->cols(['*']);
128 128
 
129
-        foreach($fields as $field => $value) {
129
+        foreach ($fields as $field => $value) {
130 130
             $query->where("`{$field}` = '{$value}'");
131 131
         }
132 132
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 
149 149
         $query->cols(["COUNT({$key}) as COUNT"]);
150 150
 
151
-        foreach($fields as $field => $value) {
151
+        foreach ($fields as $field => $value) {
152 152
             $query->where("`{$field}` = '{$value}'");
153 153
         }
154 154
 
Please login to merge, or discard this patch.