Passed
Push — develop ( cc669a...c4d599 )
by nguereza
12:37
created
src/MiddlewareResolver.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
      * @throws MiddlewareResolverException if the handler is not valid.
80 80
      */
81 81
     public function resolve(
82
-        string|MiddlewareInterface|RequestHandlerInterface|callable $handler
82
+        string | MiddlewareInterface | RequestHandlerInterface | callable $handler
83 83
     ): MiddlewareInterface {
84 84
         if ($handler instanceof MiddlewareInterface) {
85 85
             return $handler;
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -56,15 +56,13 @@  discard block
 block discarded – undo
56 56
  * @class MiddlewareResolver
57 57
  * @package Platine\Http\Handler
58 58
  */
59
-class MiddlewareResolver implements MiddlewareResolverInterface
60
-{
59
+class MiddlewareResolver implements MiddlewareResolverInterface {
61 60
     /**
62 61
      * Create new resolver instance
63 62
      * @param ContainerInterface|null $container The container instance
64 63
      * to use to resolve handler
65 64
      */
66
-    public function __construct(protected ?ContainerInterface $container = null)
67
-    {
65
+    public function __construct(protected ?ContainerInterface $container = null) {
68 66
     }
69 67
 
70 68
     /**
@@ -114,8 +112,7 @@  discard block
 block discarded – undo
114 112
             /**
115 113
              * @param callable $callable
116 114
              */
117
-            public function __construct($callable)
118
-            {
115
+            public function __construct($callable) {
119 116
                 $this->callable = $callable;
120 117
             }
121 118
 
@@ -143,8 +140,7 @@  discard block
 block discarded – undo
143 140
         return new class ($handler) implements MiddlewareInterface {
144 141
             private RequestHandlerInterface $handler;
145 142
 
146
-            public function __construct(RequestHandlerInterface $handler)
147
-            {
143
+            public function __construct(RequestHandlerInterface $handler) {
148 144
                 $this->handler = $handler;
149 145
             }
150 146
 
@@ -168,8 +164,7 @@  discard block
 block discarded – undo
168 164
             private string $handler;
169 165
             private ?ContainerInterface $container;
170 166
 
171
-            public function __construct(string $handler, ?ContainerInterface $container)
172
-            {
167
+            public function __construct(string $handler, ?ContainerInterface $container) {
173 168
                 $this->handler = $handler;
174 169
                 $this->container = $container;
175 170
             }
Please login to merge, or discard this patch.
src/Exception/MiddlewareResolverException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
41 41
  * @class MiddlewareResolverException
42 42
  * @package Platine\Http\Handler\Exception
43 43
  */
44
-class MiddlewareResolverException extends InvalidArgumentException
45
-{
44
+class MiddlewareResolverException extends InvalidArgumentException {
46 45
     /**
47 46
      * @param  mixed $response
48 47
      * @return self
Please login to merge, or discard this patch.
src/MiddlewareResolverInterface.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,6 +62,6 @@
 block discarded – undo
62 62
      * @return MiddlewareInterface
63 63
      */
64 64
     public function resolve(
65
-        string|MiddlewareInterface|RequestHandlerInterface|callable $handler
65
+        string | MiddlewareInterface | RequestHandlerInterface | callable $handler
66 66
     ): MiddlewareInterface;
67 67
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
  * @class MiddlewareResolverInterface
52 52
  * @package Platine\Http\Handler
53 53
  */
54
-interface MiddlewareResolverInterface
55
-{
54
+interface MiddlewareResolverInterface {
56 55
     /**
57 56
      * Resolve the given callable by converting it to middleware instance.
58 57
      *
Please login to merge, or discard this patch.