@@ -54,8 +54,7 @@ discard block |
||
| 54 | 54 | * @class RequestData |
| 55 | 55 | * @package Platine\Framework\Http |
| 56 | 56 | */ |
| 57 | -class RequestData |
|
| 58 | -{ |
|
| 57 | +class RequestData { |
|
| 59 | 58 | |
| 60 | 59 | /** |
| 61 | 60 | * The request body or post data |
@@ -85,8 +84,7 @@ discard block |
||
| 85 | 84 | * Create new instance |
| 86 | 85 | * @param ServerRequestInterface $request |
| 87 | 86 | */ |
| 88 | - public function __construct(ServerRequestInterface $request) |
|
| 89 | - { |
|
| 87 | + public function __construct(ServerRequestInterface $request) { |
|
| 90 | 88 | $this->posts = (array) $request->getParsedBody(); |
| 91 | 89 | $this->gets = $request->getQueryParams(); |
| 92 | 90 | $this->servers = $request->getServerParams(); |
@@ -137,8 +135,7 @@ discard block |
||
| 137 | 135 | * |
| 138 | 136 | * @return mixed |
| 139 | 137 | */ |
| 140 | - public function get(string $key, $default = null) |
|
| 141 | - { |
|
| 138 | + public function get(string $key, $default = null) { |
|
| 142 | 139 | return Arr::get($this->gets, $key, $default); |
| 143 | 140 | } |
| 144 | 141 | |
@@ -149,8 +146,7 @@ discard block |
||
| 149 | 146 | * |
| 150 | 147 | * @return mixed |
| 151 | 148 | */ |
| 152 | - public function post(string $key, $default = null) |
|
| 153 | - { |
|
| 149 | + public function post(string $key, $default = null) { |
|
| 154 | 150 | return Arr::get($this->posts, $key, $default); |
| 155 | 151 | } |
| 156 | 152 | |
@@ -161,8 +157,7 @@ discard block |
||
| 161 | 157 | * |
| 162 | 158 | * @return mixed |
| 163 | 159 | */ |
| 164 | - public function server(string $key, $default = null) |
|
| 165 | - { |
|
| 160 | + public function server(string $key, $default = null) { |
|
| 166 | 161 | return Arr::get($this->servers, $key, $default); |
| 167 | 162 | } |
| 168 | 163 | |
@@ -173,8 +168,7 @@ discard block |
||
| 173 | 168 | * |
| 174 | 169 | * @return mixed |
| 175 | 170 | */ |
| 176 | - public function cookie(string $key, $default = null) |
|
| 177 | - { |
|
| 171 | + public function cookie(string $key, $default = null) { |
|
| 178 | 172 | return Arr::get($this->cookies, $key, $default); |
| 179 | 173 | } |
| 180 | 174 | } |
@@ -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 | /** |
| 67 | 66 | * The Router instance |
@@ -80,8 +79,7 @@ discard block |
||
| 80 | 79 | * @param Router $router |
| 81 | 80 | * @param array<string> $allowedMethods the default allowed methods |
| 82 | 81 | */ |
| 83 | - public function __construct(Router $router, array $allowedMethods = ['HEAD']) |
|
| 84 | - { |
|
| 82 | + public function __construct(Router $router, array $allowedMethods = ['HEAD']) { |
|
| 85 | 83 | $this->router = $router; |
| 86 | 84 | |
| 87 | 85 | foreach ($allowedMethods as $method) { |
@@ -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 | /** |
| 66 | 65 | * The Middleware resolver instance |
@@ -72,8 +71,7 @@ discard block |
||
| 72 | 71 | * Create new instance |
| 73 | 72 | * @param MiddlewareResolverInterface $resolver |
| 74 | 73 | */ |
| 75 | - public function __construct(MiddlewareResolverInterface $resolver) |
|
| 76 | - { |
|
| 74 | + public function __construct(MiddlewareResolverInterface $resolver) { |
|
| 77 | 75 | $this->resolver = $resolver; |
| 78 | 76 | } |
| 79 | 77 | |
@@ -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 | protected Template $template; |
| 61 | 60 | |
@@ -53,15 +53,13 @@ |
||
| 53 | 53 | * @class RedirectResponse |
| 54 | 54 | * @package Platine\Framework\Http\Response |
| 55 | 55 | */ |
| 56 | -class RedirectResponse extends Response |
|
| 57 | -{ |
|
| 56 | +class RedirectResponse extends Response { |
|
| 58 | 57 | |
| 59 | 58 | /** |
| 60 | 59 | * Create new instance |
| 61 | 60 | * @param string $url |
| 62 | 61 | */ |
| 63 | - public function __construct(string $url = '/') |
|
| 64 | - { |
|
| 62 | + public function __construct(string $url = '/') { |
|
| 65 | 63 | parent::__construct(302); |
| 66 | 64 | $this->headers['Location'] = [$url]; |
| 67 | 65 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | { |
| 77 | 77 | $this->app->share(Application::class, $this->app); |
| 78 | 78 | $this->app->share('app', $this->app); |
| 79 | - $this->app->share(ConsoleApp::class, function () { |
|
| 79 | + $this->app->share(ConsoleApp::class, function() { |
|
| 80 | 80 | return new ConsoleApp('PLATINE CONSOLE', '1.0.0'); |
| 81 | 81 | }); |
| 82 | 82 | $this->app->share(ContainerInterface::class, $this->app); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $this->app->bind(RouteCollectionInterface::class, RouteCollection::class); |
| 85 | 85 | $this->app->share(Router::class); |
| 86 | 86 | $this->app->bind(MiddlewareResolverInterface::class, MiddlewareResolver::class); |
| 87 | - $this->app->bind(EmitterInterface::class, function (ContainerInterface $app) { |
|
| 87 | + $this->app->bind(EmitterInterface::class, function(ContainerInterface $app) { |
|
| 88 | 88 | return new ResponseEmitter( |
| 89 | 89 | $app->get(Config::class)->get('app.response_chunck_size', null) |
| 90 | 90 | ); |
@@ -66,8 +66,7 @@ |
||
| 66 | 66 | * @class BaseServiceProvider |
| 67 | 67 | * @package Platine\Framework\Service\Provider |
| 68 | 68 | */ |
| 69 | -class BaseServiceProvider extends ServiceProvider |
|
| 70 | -{ |
|
| 69 | +class BaseServiceProvider extends ServiceProvider { |
|
| 71 | 70 | |
| 72 | 71 | /** |
| 73 | 72 | * {@inheritdoc} |
@@ -57,8 +57,7 @@ |
||
| 57 | 57 | * @class CommandServiceProvider |
| 58 | 58 | * @package Platine\Framework\Service\Provider |
| 59 | 59 | */ |
| 60 | -class CommandServiceProvider extends ServiceProvider |
|
| 61 | -{ |
|
| 60 | +class CommandServiceProvider extends ServiceProvider { |
|
| 62 | 61 | |
| 63 | 62 | /** |
| 64 | 63 | * {@inheritdoc} |
@@ -64,8 +64,7 @@ |
||
| 64 | 64 | * @class AuthServiceProvider |
| 65 | 65 | * @package Platine\Framework\Service\Provider |
| 66 | 66 | */ |
| 67 | -class AuthServiceProvider extends ServiceProvider |
|
| 68 | -{ |
|
| 67 | +class AuthServiceProvider extends ServiceProvider { |
|
| 69 | 68 | |
| 70 | 69 | /** |
| 71 | 70 | * {@inheritdoc} |
@@ -60,8 +60,7 @@ |
||
| 60 | 60 | * @class MigrationServiceProvider |
| 61 | 61 | * @package Platine\Framework\Service\Provider |
| 62 | 62 | */ |
| 63 | -class MigrationServiceProvider extends ServiceProvider |
|
| 64 | -{ |
|
| 63 | +class MigrationServiceProvider extends ServiceProvider { |
|
| 65 | 64 | |
| 66 | 65 | /** |
| 67 | 66 | * {@inheritdoc} |