Completed
Pull Request — master (#138)
by Paul
03:26
created
src/Console/Command/ModuleCreateCommand.php 1 patch
Switch Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -190,39 +190,39 @@
 block discarded – undo
190 190
 
191 191
         // Copy files relative to the selected templating engine
192 192
         switch ($this->tplEngine) {
193
-            case self::TPL_ENGINE_PHP:
194
-            case self::TPL_ENGINE_TWIG:
195
-            case self::TPL_ENGINE_SMARTY:
196
-                // Copy templating files over
197
-                $tplFiles = $this->tplEngineFilesMap[$this->tplEngine];
198
-                $this->copyFiles($this->skeletonModuleDir, $moduleDir, $tplFiles);
199
-                // Setting up templating tokens
200
-                foreach ($tplFiles as $tplFile) {
201
-                    $tokenizedFiles[] = $tplFile;
202
-                }
203
-                $tokens['[MODULE_NAME]'] = $moduleName;
204
-                $tokens['[TPL_ENGINE_EXT]'] = $this->tplEngine;
205
-                break;
193
+        case self::TPL_ENGINE_PHP:
194
+        case self::TPL_ENGINE_TWIG:
195
+        case self::TPL_ENGINE_SMARTY:
196
+            // Copy templating files over
197
+            $tplFiles = $this->tplEngineFilesMap[$this->tplEngine];
198
+            $this->copyFiles($this->skeletonModuleDir, $moduleDir, $tplFiles);
199
+            // Setting up templating tokens
200
+            foreach ($tplFiles as $tplFile) {
201
+                $tokenizedFiles[] = $tplFile;
202
+            }
203
+            $tokens['[MODULE_NAME]'] = $moduleName;
204
+            $tokens['[TPL_ENGINE_EXT]'] = $this->tplEngine;
205
+            break;
206 206
         }
207 207
         // Routing
208 208
         switch ($this->routingEngine) {
209
-            case self::ROUTING_ENGINE_SYMFONY:
210
-            case self::ROUTING_ENGINE_AURA:
211
-            case self::ROUTING_ENGINE_LARAVEL:
212
-            case self::ROUTING_ENGINE_FASTROUTE:
213
-                // Copy routing files over
214
-                $routingFiles = $this->routingEngineFilesMap[$this->routingEngine];
215
-                $this->copyFiles($this->skeletonModuleDir, $moduleDir, $routingFiles);
216
-
217
-                // Setting up routing tokens
218
-                foreach ($routingFiles as $routingFile) {
219
-                    $tokenizedFiles[] = $routingFile;
220
-                }
221
-                $routingTokensMap = $this->routingEngineTokenMap[$this->routingEngine];
222
-                foreach ($routingTokensMap as $routingTokenKey => $routingTokenVal) {
223
-                    $tokens[$routingTokenKey] = $routingTokenVal;
224
-                }
225
-                break;
209
+        case self::ROUTING_ENGINE_SYMFONY:
210
+        case self::ROUTING_ENGINE_AURA:
211
+        case self::ROUTING_ENGINE_LARAVEL:
212
+        case self::ROUTING_ENGINE_FASTROUTE:
213
+            // Copy routing files over
214
+            $routingFiles = $this->routingEngineFilesMap[$this->routingEngine];
215
+            $this->copyFiles($this->skeletonModuleDir, $moduleDir, $routingFiles);
216
+
217
+            // Setting up routing tokens
218
+            foreach ($routingFiles as $routingFile) {
219
+                $tokenizedFiles[] = $routingFile;
220
+            }
221
+            $routingTokensMap = $this->routingEngineTokenMap[$this->routingEngine];
222
+            foreach ($routingTokensMap as $routingTokenKey => $routingTokenVal) {
223
+                $tokens[$routingTokenKey] = $routingTokenVal;
224
+            }
225
+            break;
226 226
         }
227 227
 
228 228
         // Replace tokens in all files
Please login to merge, or discard this patch.
src/ServiceManager/Factory/RouterFactory.php 1 patch
Switch Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -60,37 +60,37 @@
 block discarded – undo
60 60
 
61 61
             switch(true) {
62 62
                 // @todo - move this to a separate method()
63
-                case $moduleRoutingResponse instanceof SymfonyRouteCollection:
64
-                    $sfRouter = new SymfonyRouter($requestContext, $moduleRoutingResponse, $routerOptions, $logger);
65
-                    $sfRouterWrapper = new SymfonyRouterWrapper($sfRouter);
66
-                    $chainRouter->add($sfRouterWrapper);
67
-                    break;
68
-
69
-                // @todo - move this to a separate method()
70
-                case $moduleRoutingResponse instanceof AuraRouter:
71
-                    $auraRouterWrapper = new AuraRouterWrapper($moduleRoutingResponse);
72
-                    $chainRouter->add($auraRouterWrapper);
73
-                    break;
74
-
75
-                // @todo - move this to a separate method()
76
-                case $moduleRoutingResponse instanceof LaravelRouter:
77
-                    $laravelRequest = new LaravelRequest();
78
-                    $laravelUrlGenerator = new LaravelUrlGenerator($moduleRoutingResponse->getRoutes(), $laravelRequest);
79
-                    $laravelRouterWrapper = new LaravelRouterWrapper(
80
-                        $moduleRoutingResponse, $laravelRequest, $laravelUrlGenerator
81
-                    );
82
-                    // @todo - solve this problem
63
+            case $moduleRoutingResponse instanceof SymfonyRouteCollection:
64
+                $sfRouter = new SymfonyRouter($requestContext, $moduleRoutingResponse, $routerOptions, $logger);
65
+                $sfRouterWrapper = new SymfonyRouterWrapper($sfRouter);
66
+                $chainRouter->add($sfRouterWrapper);
67
+                break;
68
+
69
+            // @todo - move this to a separate method()
70
+            case $moduleRoutingResponse instanceof AuraRouter:
71
+                $auraRouterWrapper = new AuraRouterWrapper($moduleRoutingResponse);
72
+                $chainRouter->add($auraRouterWrapper);
73
+                break;
74
+
75
+            // @todo - move this to a separate method()
76
+            case $moduleRoutingResponse instanceof LaravelRouter:
77
+                $laravelRequest = new LaravelRequest();
78
+                $laravelUrlGenerator = new LaravelUrlGenerator($moduleRoutingResponse->getRoutes(), $laravelRequest);
79
+                $laravelRouterWrapper = new LaravelRouterWrapper(
80
+                    $moduleRoutingResponse, $laravelRequest, $laravelUrlGenerator
81
+                );
82
+                // @todo - solve this problem
83 83
 //                    $laravelRouterWrapper->setModuleName($this->getName());
84
-                    $chainRouter->add($laravelRouterWrapper);
85
-                    break;
84
+                $chainRouter->add($laravelRouterWrapper);
85
+                break;
86 86
 
87
-                case $moduleRoutingResponse instanceof FastRouteWrapper:
88
-                    $chainRouter->add($moduleRoutingResponse);
89
-                    break;
87
+            case $moduleRoutingResponse instanceof FastRouteWrapper:
88
+                $chainRouter->add($moduleRoutingResponse);
89
+                break;
90 90
 
91
-                default:
92
-                    throw new \Exception('Unexpected routes value return from module: ' . $moduleName .
93
-                        '. found value of type: ' . gettype($moduleRoutingResponse));
91
+            default:
92
+                throw new \Exception('Unexpected routes value return from module: ' . $moduleName .
93
+                    '. found value of type: ' . gettype($moduleRoutingResponse));
94 94
             }
95 95
         }
96 96
 
Please login to merge, or discard this patch.