@@ -53,8 +53,7 @@ discard block |
||
53 | 53 | use Platine\Http\ServerRequestInterface; |
54 | 54 | |
55 | 55 | |
56 | -class MiddlewareResolver implements MiddlewareResolverInterface |
|
57 | -{ |
|
56 | +class MiddlewareResolver implements MiddlewareResolverInterface { |
|
58 | 57 | |
59 | 58 | /** |
60 | 59 | * The container instance to use to resolve handler |
@@ -66,8 +65,7 @@ discard block |
||
66 | 65 | * Create new resolver instance |
67 | 66 | * @param ContainerInterface|null $container |
68 | 67 | */ |
69 | - public function __construct(?ContainerInterface $container = null) |
|
70 | - { |
|
68 | + public function __construct(?ContainerInterface $container = null) { |
|
71 | 69 | $this->container = $container; |
72 | 70 | } |
73 | 71 | |
@@ -116,8 +114,7 @@ discard block |
||
116 | 114 | |
117 | 115 | private $callable; |
118 | 116 | |
119 | - public function __construct($callable) |
|
120 | - { |
|
117 | + public function __construct($callable) { |
|
121 | 118 | $this->callable = $callable; |
122 | 119 | } |
123 | 120 | |
@@ -146,8 +143,7 @@ discard block |
||
146 | 143 | |
147 | 144 | private RequestHandlerInterface $handler; |
148 | 145 | |
149 | - public function __construct(RequestHandlerInterface $handler) |
|
150 | - { |
|
146 | + public function __construct(RequestHandlerInterface $handler) { |
|
151 | 147 | $this->handler = $handler; |
152 | 148 | } |
153 | 149 | |
@@ -173,8 +169,7 @@ discard block |
||
173 | 169 | private string $handler; |
174 | 170 | private ?ContainerInterface $container; |
175 | 171 | |
176 | - public function __construct(string $handler, ?ContainerInterface $container) |
|
177 | - { |
|
172 | + public function __construct(string $handler, ?ContainerInterface $container) { |
|
178 | 173 | $this->handler = $handler; |
179 | 174 | $this->container = $container; |
180 | 175 | } |
@@ -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 | /** |
64 | 63 | * Process an incoming server request. |
@@ -37,8 +37,7 @@ |
||
37 | 37 | use Platine\Http\ResponseInterface; |
38 | 38 | use InvalidArgumentException; |
39 | 39 | |
40 | -class MiddlewareResolverException extends InvalidArgumentException |
|
41 | -{ |
|
40 | +class MiddlewareResolverException extends InvalidArgumentException { |
|
42 | 41 | |
43 | 42 | /** |
44 | 43 | * Create the Exception instance |
@@ -46,8 +46,7 @@ |
||
46 | 46 | |
47 | 47 | namespace Platine\Http\Handler\Middleware; |
48 | 48 | |
49 | -interface MiddlewareResolverInterface |
|
50 | -{ |
|
49 | +interface MiddlewareResolverInterface { |
|
51 | 50 | |
52 | 51 | /** |
53 | 52 | * Resolve the request handler by converting it to middleware instance. |
@@ -55,8 +55,7 @@ |
||
55 | 55 | * An HTTP request handler process an HTTP request in order to produce an |
56 | 56 | * HTTP response. |
57 | 57 | */ |
58 | -interface RequestHandlerInterface |
|
59 | -{ |
|
58 | +interface RequestHandlerInterface { |
|
60 | 59 | |
61 | 60 | /** |
62 | 61 | * Handles a request and produces a response. |
@@ -52,8 +52,7 @@ discard block |
||
52 | 52 | use Platine\Http\ResponseInterface; |
53 | 53 | use Platine\Http\ServerRequestInterface; |
54 | 54 | |
55 | -class RequestHandler implements RequestHandlerInterface |
|
56 | -{ |
|
55 | +class RequestHandler implements RequestHandlerInterface { |
|
57 | 56 | |
58 | 57 | /** |
59 | 58 | * The list of middlewares |
@@ -65,8 +64,7 @@ discard block |
||
65 | 64 | * Create new instance of RequestHandler |
66 | 65 | * @param array $middlewares the default list of middlewares |
67 | 66 | */ |
68 | - public function __construct(array $middlewares = []) |
|
69 | - { |
|
67 | + public function __construct(array $middlewares = []) { |
|
70 | 68 | foreach ($middlewares as $middleware) { |
71 | 69 | if (!$middleware instanceof MiddlewareInterface) { |
72 | 70 | throw new InvalidArgumentException(sprintf( |