@@ -56,8 +56,7 @@ |
||
| 56 | 56 | * An HTTP request handler process an HTTP request in order to produce an |
| 57 | 57 | * HTTP response. |
| 58 | 58 | */ |
| 59 | -interface RequestHandlerInterface |
|
| 60 | -{ |
|
| 59 | +interface RequestHandlerInterface { |
|
| 61 | 60 | /** |
| 62 | 61 | * Handles a request and produces a response. |
| 63 | 62 | * May call other collaborating code to generate the response. |
@@ -57,8 +57,7 @@ |
||
| 57 | 57 | * by acting on the request, generating the response, or forwarding the |
| 58 | 58 | * request to a subsequent middleware and possibly acting on its response. |
| 59 | 59 | */ |
| 60 | -interface MiddlewareInterface |
|
| 61 | -{ |
|
| 60 | +interface MiddlewareInterface { |
|
| 62 | 61 | /** |
| 63 | 62 | * Process an incoming server request. |
| 64 | 63 | * |
@@ -37,8 +37,7 @@ |
||
| 37 | 37 | use Platine\Http\Handler\RequestHandlerInterface; |
| 38 | 38 | use Platine\Http\ResponseInterface; |
| 39 | 39 | |
| 40 | -class MiddlewareResolverException extends InvalidArgumentException |
|
| 41 | -{ |
|
| 40 | +class MiddlewareResolverException extends InvalidArgumentException { |
|
| 42 | 41 | /** |
| 43 | 42 | * Create the Exception instance |
| 44 | 43 | * @param mixed $handler |
@@ -52,8 +52,7 @@ discard block |
||
| 52 | 52 | use Platine\Http\ResponseInterface; |
| 53 | 53 | use Platine\Http\ServerRequestInterface; |
| 54 | 54 | |
| 55 | -class MiddlewareResolver implements MiddlewareResolverInterface |
|
| 56 | -{ |
|
| 55 | +class MiddlewareResolver implements MiddlewareResolverInterface { |
|
| 57 | 56 | /** |
| 58 | 57 | * The container instance to use to resolve handler |
| 59 | 58 | * @var ContainerInterface |
@@ -64,8 +63,7 @@ discard block |
||
| 64 | 63 | * Create new resolver instance |
| 65 | 64 | * @param ContainerInterface|null $container |
| 66 | 65 | */ |
| 67 | - public function __construct(?ContainerInterface $container = null) |
|
| 68 | - { |
|
| 66 | + public function __construct(?ContainerInterface $container = null) { |
|
| 69 | 67 | $this->container = $container; |
| 70 | 68 | } |
| 71 | 69 | |
@@ -120,8 +118,7 @@ discard block |
||
| 120 | 118 | /** |
| 121 | 119 | * @param callable $callable |
| 122 | 120 | */ |
| 123 | - public function __construct($callable) |
|
| 124 | - { |
|
| 121 | + public function __construct($callable) { |
|
| 125 | 122 | $this->callable = $callable; |
| 126 | 123 | } |
| 127 | 124 | |
@@ -149,8 +146,7 @@ discard block |
||
| 149 | 146 | return new class ($handler) implements MiddlewareInterface { |
| 150 | 147 | private RequestHandlerInterface $handler; |
| 151 | 148 | |
| 152 | - public function __construct(RequestHandlerInterface $handler) |
|
| 153 | - { |
|
| 149 | + public function __construct(RequestHandlerInterface $handler) { |
|
| 154 | 150 | $this->handler = $handler; |
| 155 | 151 | } |
| 156 | 152 | |
@@ -175,8 +171,7 @@ discard block |
||
| 175 | 171 | private string $handler; |
| 176 | 172 | private ?ContainerInterface $container; |
| 177 | 173 | |
| 178 | - public function __construct(string $handler, ?ContainerInterface $container) |
|
| 179 | - { |
|
| 174 | + public function __construct(string $handler, ?ContainerInterface $container) { |
|
| 180 | 175 | $this->handler = $handler; |
| 181 | 176 | $this->container = $container; |
| 182 | 177 | } |
@@ -47,8 +47,7 @@ |
||
| 47 | 47 | |
| 48 | 48 | namespace Platine\Http\Handler; |
| 49 | 49 | |
| 50 | -interface MiddlewareResolverInterface |
|
| 51 | -{ |
|
| 50 | +interface MiddlewareResolverInterface { |
|
| 52 | 51 | /** |
| 53 | 52 | * Resolve the given callable by converting it to middleware instance. |
| 54 | 53 | * |