Passed
Pull Request — master (#1)
by Henri
01:23
created
examples/Middleware/Lasted.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@
 block discarded – undo
8 8
 use Psr\Http\Server\RequestHandlerInterface;
9 9
 
10 10
 /** 
11
-  * @property string $error
12
-  */ 
11
+ * @property string $error
12
+ */ 
13 13
 class Lasted extends Middleware{
14 14
 
15 15
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
Please login to merge, or discard this patch.
examples/Middleware/Auth.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 use Psr\Http\Server\RequestHandlerInterface;
8 8
 
9 9
 /** 
10
-  * @property string $error
11
-  */ 
10
+ * @property string $error
11
+ */ 
12 12
 class Auth extends Middleware{
13 13
 
14 14
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
Please login to merge, or discard this patch.
examples/MiddlewareExample.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
 
78 78
     runMiddlewares($serverRequest);
79 79
 
80
-}catch(Exception $er){
80
+} catch(Exception $er){
81 81
 
82 82
     die("Code Error: {$er->getCode()}<br>Line: {$er->getLine()}<br>File: {$er->getFile()}<br>Message: {$er->getMessage()}.");
83 83
 
Please login to merge, or discard this patch.
examples/DefaultUseExample.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */ 
29 29
     $action = Router::currentAction();
30 30
 
31
-}catch(Exception $er){
31
+} catch(Exception $er){
32 32
 
33 33
     die("Code Error: {$er->getCode()}<br>Line: {$er->getLine()}<br>File: {$er->getFile()}<br>Message: {$er->getMessage()}.");
34 34
 
Please login to merge, or discard this patch.
src/Router.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                 self::getInstance()->checkMethod($route, $_SERVER['REQUEST_METHOD']);
64 64
                 self::getInstance()->checkData($route, (new Uri($_SERVER['REQUEST_URI']))->getPath());
65 65
                 return self::getInstance();
66
-            }catch(\Exception $er){
66
+            } catch(\Exception $er){
67 67
                 continue;
68 68
             }
69 69
         }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         
90 90
         try{
91 91
             self::getInstance()->executeRouteAction(self::getInstance()->current()['action']);
92
-        }catch(\Exception $er){
92
+        } catch(\Exception $er){
93 93
             self::getInstance()->error = $er;
94 94
         }
95 95
         
Please login to merge, or discard this patch.
src/DefinitionsTrait.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
         }
67 67
 
68 68
         $routes[$index] = [
69
-			'uri' => new Uri(self::getInstance()->getHost().self::getInstance()->getPrefix().$uri),
70
-			'action' => $closure,
71
-			'method' => strtoupper($method),
69
+            'uri' => new Uri(self::getInstance()->getHost().self::getInstance()->getPrefix().$uri),
70
+            'action' => $closure,
71
+            'method' => strtoupper($method),
72 72
             'middlewares' => [],
73 73
             'where' => [],
74 74
             'before' => [],
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     private static function checkDuplicity(string $uri, string $method): void
87 87
     {
88 88
         foreach(self::getInstance()->getRoutes() as $route){
89
-    		if( md5($route['uri'].$route['method']) === md5($uri.$method) ){
89
+            if( md5($route['uri'].$route['method']) === md5($uri.$method) ){
90 90
                 throw new \RuntimeException("There is already a route with the URI {$uri} and with the {$method} METHOD configured.");
91 91
             }
92 92
         }
Please login to merge, or discard this patch.