Passed
Push — main ( 7f34fc...ff3d68 )
by Roberto
12:26
created
src/Routing/Match/MatchFile.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
 
6 6
 class MatchFile extends BaseMatch
7 7
 {
8
-  public function __construct(public $filePath, public $contentType)
9
-  {
8
+    public function __construct(public $filePath, public $contentType)
9
+    {
10 10
 
11
-  }
11
+    }
12 12
 
13 13
 }
Please login to merge, or discard this patch.
src/Core/Handler/AbstractHandler.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     protected $middlewares = array();
16 16
 
17 17
     public function __construct($request){
18
-      $this->request = $request;
18
+        $this->request = $request;
19 19
     }
20 20
 
21 21
     public function addMiddlewares($middlewares) {
@@ -24,12 +24,12 @@  discard block
 block discarded – undo
24 24
 
25 25
 
26 26
     public function getResponse() : HttpResponse{
27
-      $matcher = $this->resolveRequest();
28
-      return $this->handle($matcher);
27
+        $matcher = $this->resolveRequest();
28
+        return $this->handle($matcher);
29 29
 
30 30
     }
31 31
 
32 32
 
33 33
 
34
-  }
34
+    }
35 35
 
Please login to merge, or discard this patch.
src/Core/Application.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      * Returns the appropriate handler for the pending request
62 62
      *
63 63
      * @return AbstractHandler $handler
64
-    */
64
+     */
65 65
     public static function getHandler(): AbstractHandler
66 66
     {
67 67
         $regex = '/\.(?:'.implode('|', static::$_config->static_files_extensions).')$/';
Please login to merge, or discard this patch.
src/Http/Response/SuccessResponse.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Lepton\Http\Response;
4 4
 
5
- class SuccessResponse extends HttpResponse
5
+    class SuccessResponse extends HttpResponse
6 6
 {
7 7
 
8 8
     public function __construct(
Please login to merge, or discard this patch.
src/Http/Response/FileResponse.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Lepton\Http\Response;
4 4
 
5
- class FileResponse extends SuccessResponse
5
+    class FileResponse extends SuccessResponse
6 6
 {
7 7
 
8 8
     public function __construct(
Please login to merge, or discard this patch.
src/Http/Response/NotFoundResponse.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Lepton\Http\Response;
4 4
 
5
- class NotFoundResponse extends HttpResponse
5
+    class NotFoundResponse extends HttpResponse
6 6
 {
7 7
 
8 8
     public function __construct(
Please login to merge, or discard this patch.
src/Http/Response/InternalErrorResponse.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Lepton\Http\Response;
4 4
 
5
- class InternalErrorResponse extends HttpResponse
5
+    class InternalErrorResponse extends HttpResponse
6 6
 {
7 7
 
8 8
     public function __construct(
Please login to merge, or discard this patch.
src/Core/Handler/BaseHandler.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,13 +58,13 @@
 block discarded – undo
58 58
         if($matcher instanceof MatchRoute) {
59 59
 
60 60
             foreach($this->middlewares as $middleware => $args){
61
-              $middlewareInstance = new $middleware();
62
-              $middlewareInstance->addMatcher($matcher);
63
-              $middlewareInstance->setRequest($this->request);
64
-              $middlewareResult = $middlewareInstance(...$args);
65
-              if($middlewareResult instanceof HttpResponse){
61
+                $middlewareInstance = new $middleware();
62
+                $middlewareInstance->addMatcher($matcher);
63
+                $middlewareInstance->setRequest($this->request);
64
+                $middlewareResult = $middlewareInstance(...$args);
65
+                if($middlewareResult instanceof HttpResponse){
66 66
                 return $middlewareResult;
67
-              }
67
+                }
68 68
             }
69 69
 
70 70
             Application::$controller = $matcher->controller;
Please login to merge, or discard this patch.
src/Core/Handler/StaticHandler.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,14 +52,14 @@
 block discarded – undo
52 52
             return new MatchFile(filePath: $filePath, contentType: $contentType);
53 53
         } else {
54 54
             die($filePath);
55
-          return new Match404();
55
+            return new Match404();
56 56
         }
57 57
     }
58 58
 
59 59
     public function handle($match): FileResponse|NotFoundResponse{
60
-      if($match instanceof Match404){
60
+        if($match instanceof Match404){
61 61
         return new NotFoundResponse();
62
-      }
63
-      return new FileResponse($match->filePath, $match->contentType);
62
+        }
63
+        return new FileResponse($match->filePath, $match->contentType);
64 64
     }
65 65
 }
Please login to merge, or discard this patch.