Completed
Pull Request — master (#154)
by Vítor
03:32
created
src/Debug/ExceptionHandler.php 1 patch
Switch Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -180,11 +180,11 @@
 block discarded – undo
180 180
     public function getContent(FlattenException $exception, $showAll = true)
181 181
     {
182 182
         switch ($exception->getStatusCode()) {
183
-            case 404:
184
-                $title = "The page you are looking for could not be found";
185
-                break;
186
-            default:
187
-                $title = "Oh noes, something's broken";
183
+        case 404:
184
+            $title = "The page you are looking for could not be found";
185
+            break;
186
+        default:
187
+            $title = "Oh noes, something's broken";
188 188
         }
189 189
 
190 190
         $content = '';
Please login to merge, or discard this patch.
src/Module/Controller.php 1 patch
Switch Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -254,34 +254,34 @@
 block discarded – undo
254 254
     {
255 255
         switch ($key = strtolower($key)) {
256 256
 
257
-            case 'ajax':
258
-                if (!isset($this->isCache['ajax'])) {
259
-                    return $this->isCache['ajax'] = $this->getService('Request')->isXmlHttpRequest();
260
-                }
261
-
262
-                return $this->isCache['ajax'];
263
-
264
-            case 'put':
265
-            case 'delete':
266
-            case 'post':
267
-            case 'patch':
268
-                if (!isset($this->isCache['requestMethod'][$key])) {
269
-                    $this->isCache['requestMethod'][$key] = $this->getService('Request')->getMethod() === strtoupper($key);
270
-                }
271
-
272
-                return $this->isCache['requestMethod'][$key];
273
-
274
-            case 'ssl':
275
-            case 'https':
276
-            case 'secure':
277
-                if (!isset($this->isCache['secure'])) {
278
-                    $this->isCache['secure'] = $this->getService('Request')->isSecure();
279
-                }
280
-
281
-                return $this->isCache['secure'];
282
-
283
-            default:
284
-                throw new \InvalidArgumentException("Invalid 'is' key supplied: {$key}");
257
+        case 'ajax':
258
+            if (!isset($this->isCache['ajax'])) {
259
+                return $this->isCache['ajax'] = $this->getService('Request')->isXmlHttpRequest();
260
+            }
261
+
262
+            return $this->isCache['ajax'];
263
+
264
+        case 'put':
265
+        case 'delete':
266
+        case 'post':
267
+        case 'patch':
268
+            if (!isset($this->isCache['requestMethod'][$key])) {
269
+                $this->isCache['requestMethod'][$key] = $this->getService('Request')->getMethod() === strtoupper($key);
270
+            }
271
+
272
+            return $this->isCache['requestMethod'][$key];
273
+
274
+        case 'ssl':
275
+        case 'https':
276
+        case 'secure':
277
+            if (!isset($this->isCache['secure'])) {
278
+                $this->isCache['secure'] = $this->getService('Request')->isSecure();
279
+            }
280
+
281
+            return $this->isCache['secure'];
282
+
283
+        default:
284
+            throw new \InvalidArgumentException("Invalid 'is' key supplied: {$key}");
285 285
 
286 286
         }
287 287
     }
Please login to merge, or discard this patch.
src/ServiceManager/Factory/RouterFactory.php 1 patch
Switch Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -58,37 +58,37 @@
 block discarded – undo
58 58
         foreach ($allModuleRoutes as $moduleName => $moduleRoutingResponse) {
59 59
             switch (true) {
60 60
                 // @todo - move this to a separate method()
61
-                case $moduleRoutingResponse instanceof SymfonyRouteCollection:
62
-                    $sfRouter = new SymfonyRouter($requestContext, $moduleRoutingResponse, $routerOptions, $logger);
63
-                    $sfRouterWrapper = new SymfonyRouterWrapper($sfRouter);
64
-                    $chainRouter->add($sfRouterWrapper);
65
-                    break;
61
+            case $moduleRoutingResponse instanceof SymfonyRouteCollection:
62
+                $sfRouter = new SymfonyRouter($requestContext, $moduleRoutingResponse, $routerOptions, $logger);
63
+                $sfRouterWrapper = new SymfonyRouterWrapper($sfRouter);
64
+                $chainRouter->add($sfRouterWrapper);
65
+                break;
66 66
 
67
-                // @todo - move this to a separate method()
68
-                case $moduleRoutingResponse instanceof AuraRouter:
69
-                    $auraRouterWrapper = new AuraRouterWrapper($moduleRoutingResponse);
70
-                    $chainRouter->add($auraRouterWrapper);
71
-                    break;
67
+            // @todo - move this to a separate method()
68
+            case $moduleRoutingResponse instanceof AuraRouter:
69
+                $auraRouterWrapper = new AuraRouterWrapper($moduleRoutingResponse);
70
+                $chainRouter->add($auraRouterWrapper);
71
+                break;
72 72
 
73
-                // @todo - move this to a separate method()
74
-                case $moduleRoutingResponse instanceof LaravelRouter:
75
-                    $laravelRequest = new LaravelRequest();
76
-                    $laravelUrlGenerator = new LaravelUrlGenerator($moduleRoutingResponse->getRoutes(), $laravelRequest);
77
-                    $laravelRouterWrapper = new LaravelRouterWrapper(
78
-                        $moduleRoutingResponse, $laravelRequest, $laravelUrlGenerator
79
-                    );
80
-                    // @todo - solve this problem
73
+            // @todo - move this to a separate method()
74
+            case $moduleRoutingResponse instanceof LaravelRouter:
75
+                $laravelRequest = new LaravelRequest();
76
+                $laravelUrlGenerator = new LaravelUrlGenerator($moduleRoutingResponse->getRoutes(), $laravelRequest);
77
+                $laravelRouterWrapper = new LaravelRouterWrapper(
78
+                    $moduleRoutingResponse, $laravelRequest, $laravelUrlGenerator
79
+                );
80
+                // @todo - solve this problem
81 81
 //                    $laravelRouterWrapper->setModuleName($this->getName());
82
-                    $chainRouter->add($laravelRouterWrapper);
83
-                    break;
82
+                $chainRouter->add($laravelRouterWrapper);
83
+                break;
84 84
 
85
-                case $moduleRoutingResponse instanceof FastRouteWrapper:
86
-                    $chainRouter->add($moduleRoutingResponse);
87
-                    break;
85
+            case $moduleRoutingResponse instanceof FastRouteWrapper:
86
+                $chainRouter->add($moduleRoutingResponse);
87
+                break;
88 88
 
89
-                default:
90
-                    throw new \Exception('Unexpected routes value return from module: ' . $moduleName .
91
-                        '. found value of type: ' . gettype($moduleRoutingResponse));
89
+            default:
90
+                throw new \Exception('Unexpected routes value return from module: ' . $moduleName .
91
+                    '. found value of type: ' . gettype($moduleRoutingResponse));
92 92
             }
93 93
         }
94 94
 
Please login to merge, or discard this patch.