Completed
Pull Request — master (#138)
by Paul
03:26
created
src/Console/Command/ModuleCreateCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -351,16 +351,16 @@
 block discarded – undo
351 351
     private function checkRouters(InputInterface $input, OutputInterface $output)
352 352
     {
353 353
         // Aura Check
354
-        if($this->routingEngine == self::ROUTING_ENGINE_AURA && !class_exists('\Aura\Router\Router')) {
354
+        if ($this->routingEngine == self::ROUTING_ENGINE_AURA && !class_exists('\Aura\Router\Router')) {
355 355
             $output->writeln("<comment>Aura Router doesn't appear to be loaded. Run: <info>composer require ppi/aura-router</info></comment>");
356 356
         }
357 357
 
358 358
         // Laravel check
359
-        if($this->routingEngine == self::ROUTING_ENGINE_LARAVEL && !class_exists('\PPI\LaravelRouting\LaravelRouter')) {
359
+        if ($this->routingEngine == self::ROUTING_ENGINE_LARAVEL && !class_exists('\PPI\LaravelRouting\LaravelRouter')) {
360 360
             $output->writeln("<comment>Laravel Router doesn't appear to be loaded. Run: <info>composer require ppi/laravel-router</info></comment>");
361 361
         }
362 362
 
363
-        if($this->routingEngine == self::ROUTING_ENGINE_FASTROUTE && !class_exists('\PPI\FastRoute\FastRouteWrapper')) {
363
+        if ($this->routingEngine == self::ROUTING_ENGINE_FASTROUTE && !class_exists('\PPI\FastRoute\FastRouteWrapper')) {
364 364
             $output->writeln("<comment>Laravel Router doesn't appear to be loaded. Run: <info>composer require ppi/fast-route</info></comment>");
365 365
         }
366 366
 
Please login to merge, or discard this patch.
src/Module/AbstractModule.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $dataGenerator = new \FastRoute\DataGenerator\GroupCountBased();
138 138
         $routeCollector = new \FastRoute\RouteCollector($routeParser, $dataGenerator);
139 139
 
140
-        if(!is_readable($path)) {
140
+        if (!is_readable($path)) {
141 141
             throw new \InvalidArgumentException('Invalid fast route routes path found: ' . $path);
142 142
         }
143 143
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         };
150 150
 
151 151
         $routeCollector = $getRouteCollector();
152
-        if(!($routeCollector instanceof \FastRoute\RouteCollector)) {
152
+        if (!($routeCollector instanceof \FastRoute\RouteCollector)) {
153 153
             throw new \Exception('Invalid return value from '
154 154
                 . pathinfo($path, PATHINFO_FILENAME)
155 155
                 . ' expected instance of RouteCollector'
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     protected function loadAuraRoutes($path)
176 176
     {
177 177
 
178
-        if(!is_readable($path)) {
178
+        if (!is_readable($path)) {
179 179
             throw new \InvalidArgumentException('Invalid aura routes path found: ' . $path);
180 180
         }
181 181
 
@@ -184,14 +184,14 @@  discard block
 block discarded – undo
184 184
         // The included file must return the aura router
185 185
         $router = include $path;
186 186
 
187
-        if(!($router instanceof AuraRouter)) {
187
+        if (!($router instanceof AuraRouter)) {
188 188
             throw new \Exception('Invalid return value from '
189 189
                 . pathinfo($path, PATHINFO_FILENAME)
190 190
                 . ' expected instance of AuraRouter'
191 191
             );
192 192
         }
193 193
 
194
-        foreach($router->getRoutes() as $route) {
194
+        foreach ($router->getRoutes() as $route) {
195 195
             $route->addValues(array('_module' => $this->getName()));
196 196
         }
197 197
 
Please login to merge, or discard this patch.