Passed
Branch v2-dev (e78e12)
by Henri
01:36
created
examples/Middleware/Lasted.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@
 block discarded – undo
10 10
 /** 
11 11
   * @property string $error
12 12
   */ 
13
-class Lasted extends Middleware{
13
+class Lasted extends Middleware {
14 14
 
15 15
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
16 16
     {
17
-        if(!isset($this->error)){
17
+        if (!isset($this->error)) {
18 18
             throw new Exception("Access not belonged: {$this->error}");
19 19
         }
20 20
 
Please login to merge, or discard this patch.
examples/Middleware/Auth.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@
 block discarded – undo
9 9
 /** 
10 10
   * @property string $error
11 11
   */ 
12
-class Auth extends Middleware{
12
+class Auth extends Middleware {
13 13
 
14 14
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
15 15
     {
16
-        if(!array_key_exists('user',$_SESSION)){
16
+        if (!array_key_exists('user', $_SESSION)) {
17 17
             $this->error = 'The user must be logged in to the system';
18 18
         }
19 19
 
Please login to merge, or discard this patch.
examples/index.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 use HnrAzevedo\Router\Router;
11 11
 
12
-try{
12
+try {
13 13
 
14 14
     Router::globalMiddlewares([
15 15
         'Lasted'=> \HnrAzevedo\Router\Example\Middleware\Lasted::class
@@ -26,7 +26,7 @@  discard block
 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()}<br>Line: {$er->getLine()}<br>File: {$er->getFile()}<br>Message: {$er->getMessage()}.");
32 32
 
Please login to merge, or discard this 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()}<br>Line: {$er->getLine()}<br>File: {$er->getFile()}<br>Message: {$er->getMessage()}.");
32 32
 
Please login to merge, or discard this patch.