Passed
Branch v2-dev (0ddf7c)
by Henri
10:02
created
src/DefinitionsTrait.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
         
58 58
         self::checkDuplicity($uri,$method);
59 59
         
60
-		self::getInstance()->routes[] = [
61
-			'uri' => new Uri(self::getInstance()->host.self::getInstance()->prefix.$uri),
62
-			'action' => $closure,
63
-			'method' => strtoupper($method),
60
+        self::getInstance()->routes[] = [
61
+            'uri' => new Uri(self::getInstance()->host.self::getInstance()->prefix.$uri),
62
+            'action' => $closure,
63
+            'method' => strtoupper($method),
64 64
             'middlewares' => null,
65 65
             'where' => null,
66 66
             'before' => null,
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     private static function checkDuplicity(string $uri, string $method): void
76 76
     {
77 77
         foreach(self::getInstance()->routes as $route){
78
-    		if( md5($route['uri'].$route['method']) === md5($uri.$method) ){
78
+            if( md5($route['uri'].$route['method']) === md5($uri.$method) ){
79 79
                 throw new \RuntimeException("There is already a route with the URI {$uri} and with the {$method} METHOD configured.");
80 80
             }
81 81
         }
Please login to merge, or discard this patch.
src/Router.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
                 self::getInstance()->checkData($route['uri']->getPath(), $_SERVER['REQUEST_URI']);
81 81
                 self::getInstance()->sortRoutes();                
82 82
                 return self::getInstance();
83
-            }catch(\Exception $er){
83
+            } catch(\Exception $er){
84 84
                 continue;
85 85
             }
86 86
         }
Please login to merge, or discard this patch.
examples/index.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     /* Return current action route */
27 27
     $action = Router::currentAction();
28 28
 
29
-}catch(Exception $er){
29
+} catch(Exception $er){
30 30
 
31 31
     die("Code Error: {$er->getCode()}, Line: {$er->getLine()}, File: {$er->getFile()}, Message: {$er->getMessage()}.");
32 32
 
Please login to merge, or discard this patch.