@@ -65,8 +65,7 @@ discard block |
||
65 | 65 | * @class Application |
66 | 66 | * @package Platine\Framework\App |
67 | 67 | */ |
68 | -class Application extends Container |
|
69 | -{ |
|
68 | +class Application extends Container { |
|
70 | 69 | /** |
71 | 70 | * The application version |
72 | 71 | */ |
@@ -148,8 +147,7 @@ discard block |
||
148 | 147 | * Create new instance |
149 | 148 | * @param string $basePath |
150 | 149 | */ |
151 | - public function __construct(string $basePath = '') |
|
152 | - { |
|
150 | + public function __construct(string $basePath = '') { |
|
153 | 151 | parent::__construct(); |
154 | 152 | |
155 | 153 | $this->basePath = $basePath; |
@@ -244,8 +242,7 @@ discard block |
||
244 | 242 | * @param string $env |
245 | 243 | * @return $this |
246 | 244 | */ |
247 | - public function setEnvironment(string $env) |
|
248 | - { |
|
245 | + public function setEnvironment(string $env) { |
|
249 | 246 | $this->env = $env; |
250 | 247 | |
251 | 248 | return $this; |
@@ -60,8 +60,7 @@ discard block |
||
60 | 60 | * @class RouteMatchMiddleware |
61 | 61 | * @package Platine\Framework\Http\Middleware |
62 | 62 | */ |
63 | -class RouteMatchMiddleware implements MiddlewareInterface |
|
64 | -{ |
|
63 | +class RouteMatchMiddleware implements MiddlewareInterface { |
|
65 | 64 | /** |
66 | 65 | * The Router instance |
67 | 66 | * @var Router |
@@ -79,8 +78,7 @@ discard block |
||
79 | 78 | * @param Router $router |
80 | 79 | * @param array<string> $allowedMethods the default allowed methods |
81 | 80 | */ |
82 | - public function __construct(Router $router, array $allowedMethods = ['HEAD']) |
|
83 | - { |
|
81 | + public function __construct(Router $router, array $allowedMethods = ['HEAD']) { |
|
84 | 82 | $this->router = $router; |
85 | 83 | |
86 | 84 | foreach ($allowedMethods as $method) { |
@@ -58,8 +58,7 @@ discard block |
||
58 | 58 | * @class BodyParserMiddleware |
59 | 59 | * @package Platine\Framework\Http\Middleware |
60 | 60 | */ |
61 | -class BodyParserMiddleware implements MiddlewareInterface |
|
62 | -{ |
|
61 | +class BodyParserMiddleware implements MiddlewareInterface { |
|
63 | 62 | /** |
64 | 63 | * List of body parser to use |
65 | 64 | * @var array<string, callable> |
@@ -69,8 +68,7 @@ discard block |
||
69 | 68 | /** |
70 | 69 | * Create new instance |
71 | 70 | */ |
72 | - public function __construct() |
|
73 | - { |
|
71 | + public function __construct() { |
|
74 | 72 | $this->registerDefaultParsers(); |
75 | 73 | } |
76 | 74 | |
@@ -155,8 +153,7 @@ discard block |
||
155 | 153 | * @param ServerRequestInterface $request |
156 | 154 | * @return null|array<mixed>|object |
157 | 155 | */ |
158 | - protected function parseBody(ServerRequestInterface $request) |
|
159 | - { |
|
156 | + protected function parseBody(ServerRequestInterface $request) { |
|
160 | 157 | $contentType = $this->getRequestContentType($request); |
161 | 158 | if ($contentType === null) { |
162 | 159 | return null; |
@@ -62,8 +62,7 @@ |
||
62 | 62 | * @package Platine\Framework\Http\Middleware |
63 | 63 | * @template T |
64 | 64 | */ |
65 | -class CorsMiddleware implements MiddlewareInterface |
|
66 | -{ |
|
65 | +class CorsMiddleware implements MiddlewareInterface { |
|
67 | 66 | /** |
68 | 67 | * The configuration instance |
69 | 68 | * @var Config<T> |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * @class RouteDispatcherMiddleware |
60 | 60 | * @package Platine\Framework\Http\Middleware |
61 | 61 | */ |
62 | -class RouteDispatcherMiddleware implements MiddlewareInterface |
|
63 | -{ |
|
62 | +class RouteDispatcherMiddleware implements MiddlewareInterface { |
|
64 | 63 | /** |
65 | 64 | * The Middleware resolver instance |
66 | 65 | * @var MiddlewareResolverInterface |
@@ -71,8 +70,7 @@ discard block |
||
71 | 70 | * Create new instance |
72 | 71 | * @param MiddlewareResolverInterface $resolver |
73 | 72 | */ |
74 | - public function __construct(MiddlewareResolverInterface $resolver) |
|
75 | - { |
|
73 | + public function __construct(MiddlewareResolverInterface $resolver) { |
|
76 | 74 | $this->resolver = $resolver; |
77 | 75 | } |
78 | 76 |
@@ -63,8 +63,7 @@ discard block |
||
63 | 63 | * @class ErrorHandlerMiddleware |
64 | 64 | * @package Platine\Framework\Http\Middleware |
65 | 65 | */ |
66 | -class ErrorHandlerMiddleware implements MiddlewareInterface |
|
67 | -{ |
|
66 | +class ErrorHandlerMiddleware implements MiddlewareInterface { |
|
68 | 67 | /** |
69 | 68 | * The logger instance to use to save error |
70 | 69 | * @var LoggerInterface |
@@ -100,8 +99,7 @@ discard block |
||
100 | 99 | * @param bool $detail |
101 | 100 | * @param LoggerInterface $logger |
102 | 101 | */ |
103 | - public function __construct(bool $detail, LoggerInterface $logger) |
|
104 | - { |
|
102 | + public function __construct(bool $detail, LoggerInterface $logger) { |
|
105 | 103 | $this->detail = $detail; |
106 | 104 | $this->logger = $logger; |
107 | 105 | $this->errorHandler = $this->getDefaultErrorHanlder(); |
@@ -65,8 +65,7 @@ |
||
65 | 65 | * @package Platine\Framework\Http\Middleware |
66 | 66 | * @template T |
67 | 67 | */ |
68 | -class CsrfMiddleware implements MiddlewareInterface |
|
69 | -{ |
|
68 | +class CsrfMiddleware implements MiddlewareInterface { |
|
70 | 69 | /** |
71 | 70 | * The configuration instance |
72 | 71 | * @var Config<T> |
@@ -54,8 +54,7 @@ |
||
54 | 54 | * @class TemplateResponse |
55 | 55 | * @package Platine\Framework\Http\Response |
56 | 56 | */ |
57 | -class TemplateResponse extends Response |
|
58 | -{ |
|
57 | +class TemplateResponse extends Response { |
|
59 | 58 | /** |
60 | 59 | * The template instance |
61 | 60 | * @var Template |
@@ -51,8 +51,7 @@ |
||
51 | 51 | * @class RestResponse |
52 | 52 | * @package Platine\Framework\Http\Response |
53 | 53 | */ |
54 | -class RestResponse extends JsonResponse |
|
55 | -{ |
|
54 | +class RestResponse extends JsonResponse { |
|
56 | 55 | /** |
57 | 56 | * Create new instance |
58 | 57 | * @param mixed $data |