Completed
Push — master ( 351105...94b286 )
by Joao
02:40
created
src/RouteHandler.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
 
28 28
     protected $_defaultMethods = [
29 29
         // Service
30
-        [ "method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{action}/{id:[0-9]+}/{secondid}.{output}' ],
31
-        [ "method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{action}/{id:[0-9]+}.{output}' ],
32
-        [ "method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{id:[0-9]+}/{action}.{output}' ],
33
-        [ "method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{id:[0-9]+}.{output}' ],
34
-        [ "method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{action}.{output}' ],
35
-        [ "method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}.{output}' ]
30
+        ["method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{action}/{id:[0-9]+}/{secondid}.{output}'],
31
+        ["method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{action}/{id:[0-9]+}.{output}'],
32
+        ["method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{id:[0-9]+}/{action}.{output}'],
33
+        ["method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{id:[0-9]+}.{output}'],
34
+        ["method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}/{action}.{output}'],
35
+        ["method" => ['GET', 'POST', 'PUT', 'DELETE'], "pattern" => '/{version}/{module}.{output}']
36 36
     ];
37 37
     protected $_moduleAlias = [];
38 38
     protected $_defaultRestVersion = '1.0';
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
      * @param string $version
245 245
      * @param string $routeIndex
246 246
      */
247
-    public static function handleRoute($moduleAlias = [], $routePattern = null, $version = '1.0', $defaultOutput = null ,$routeIndex = "index.php")
247
+    public static function handleRoute($moduleAlias = [], $routePattern = null, $version = '1.0', $defaultOutput = null, $routeIndex = "index.php")
248 248
     {
249 249
         ob_start();
250 250
         session_start();
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
          * you can request only:
264 264
          * http://somehost/module/somealias
265 265
          */
266
-        foreach ((array) $moduleAlias as $alias => $module) {
266
+        foreach ((array)$moduleAlias as $alias => $module) {
267 267
             $route->addModuleAlias($alias, $module);
268 268
         }
269 269
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
             && file_exists($_SERVER['SCRIPT_FILENAME'])
307 307
             && basename($_SERVER['SCRIPT_FILENAME']) !== "route.php"
308 308
             && basename($_SERVER['SCRIPT_FILENAME']) !== $routeIndex
309
-        )  {
309
+        ) {
310 310
             $file = $_SERVER['SCRIPT_FILENAME'];
311 311
             if (strpos($file, '.php') !== false) {
312 312
                 require_once($file);
Please login to merge, or discard this patch.