@@ -53,8 +53,7 @@ discard block |
||
| 53 | 53 | * @class BaseKernel |
| 54 | 54 | * @package Platine\Framework\Kernel |
| 55 | 55 | */ |
| 56 | -class BaseKernel |
|
| 57 | -{ |
|
| 56 | +class BaseKernel { |
|
| 58 | 57 | |
| 59 | 58 | /** |
| 60 | 59 | * Application instance |
@@ -66,8 +65,7 @@ discard block |
||
| 66 | 65 | * Create new instance |
| 67 | 66 | * @param Application $app |
| 68 | 67 | */ |
| 69 | - public function __construct(Application $app) |
|
| 70 | - { |
|
| 68 | + public function __construct(Application $app) { |
|
| 71 | 69 | $this->app = $app; |
| 72 | 70 | } |
| 73 | 71 | |
@@ -67,8 +67,7 @@ |
||
| 67 | 67 | * @package Platine\Framework\Kernel |
| 68 | 68 | * @template T |
| 69 | 69 | */ |
| 70 | -class HttpKernel extends BaseKernel implements RequestHandlerInterface |
|
| 71 | -{ |
|
| 70 | +class HttpKernel extends BaseKernel implements RequestHandlerInterface { |
|
| 72 | 71 | |
| 73 | 72 | /** |
| 74 | 73 | * The router instance |
@@ -58,8 +58,7 @@ discard block |
||
| 58 | 58 | * @package Platine\Framework\Kernel |
| 59 | 59 | * @template T |
| 60 | 60 | */ |
| 61 | -class ConsoleKernel extends BaseKernel |
|
| 62 | -{ |
|
| 61 | +class ConsoleKernel extends BaseKernel { |
|
| 63 | 62 | |
| 64 | 63 | protected ConsoleApp $console; |
| 65 | 64 | |
@@ -80,8 +79,7 @@ discard block |
||
| 80 | 79 | * @param Application $app |
| 81 | 80 | * @param ConsoleApp $console |
| 82 | 81 | */ |
| 83 | - public function __construct(Application $app, ConsoleApp $console) |
|
| 84 | - { |
|
| 82 | + public function __construct(Application $app, ConsoleApp $console) { |
|
| 85 | 83 | parent::__construct($app); |
| 86 | 84 | $this->console = $console; |
| 87 | 85 | } |
@@ -54,8 +54,7 @@ |
||
| 54 | 54 | * @class EmitterInterface |
| 55 | 55 | * @package Platine\Framework\Http\Emitter |
| 56 | 56 | */ |
| 57 | -interface EmitterInterface |
|
| 58 | -{ |
|
| 57 | +interface EmitterInterface { |
|
| 59 | 58 | |
| 60 | 59 | /** |
| 61 | 60 | * Emits a HTTP response, that including status line, headers and message |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | * @class HeadersAlreadySentException |
| 41 | 41 | * @package Platine\Framework\Http\Emitter\Exception |
| 42 | 42 | */ |
| 43 | -class HeadersAlreadySentException extends RuntimeException |
|
| 44 | -{ |
|
| 43 | +class HeadersAlreadySentException extends RuntimeException { |
|
| 45 | 44 | /** |
| 46 | 45 | * Create new instance |
| 47 | 46 | * @return self |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | * @class OutputAlreadySentException |
| 41 | 41 | * @package Platine\Http\Framework\Emitter\Exception |
| 42 | 42 | */ |
| 43 | -class OutputAlreadySentException extends RuntimeException |
|
| 44 | -{ |
|
| 43 | +class OutputAlreadySentException extends RuntimeException { |
|
| 45 | 44 | /** |
| 46 | 45 | * Create new instance |
| 47 | 46 | * @return self |
@@ -58,8 +58,7 @@ discard block |
||
| 58 | 58 | * @class ResponseEmitter |
| 59 | 59 | * @package Platine\Framework\Http\Emitter |
| 60 | 60 | */ |
| 61 | -class ResponseEmitter implements EmitterInterface |
|
| 62 | -{ |
|
| 61 | +class ResponseEmitter implements EmitterInterface { |
|
| 63 | 62 | |
| 64 | 63 | /** |
| 65 | 64 | * The response before length |
@@ -71,8 +70,7 @@ discard block |
||
| 71 | 70 | * Create new instance |
| 72 | 71 | * @param int|null $bufferLength |
| 73 | 72 | */ |
| 74 | - public function __construct(?int $bufferLength = null) |
|
| 75 | - { |
|
| 73 | + public function __construct(?int $bufferLength = null) { |
|
| 76 | 74 | if ($bufferLength !== null && $bufferLength < 1) { |
| 77 | 75 | throw new InvalidArgumentException(sprintf( |
| 78 | 76 | 'The response buffer length must be greater than zero; received [%d].', |
@@ -55,8 +55,7 @@ discard block |
||
| 55 | 55 | * @class RouteHelper |
| 56 | 56 | * @package Platine\Framework\Http |
| 57 | 57 | */ |
| 58 | -class RouteHelper |
|
| 59 | -{ |
|
| 58 | +class RouteHelper { |
|
| 60 | 59 | |
| 61 | 60 | /** |
| 62 | 61 | * The router instance |
@@ -68,8 +67,7 @@ discard block |
||
| 68 | 67 | * Create new instance |
| 69 | 68 | * @param Router $router |
| 70 | 69 | */ |
| 71 | - public function __construct(Router $router) |
|
| 72 | - { |
|
| 70 | + public function __construct(Router $router) { |
|
| 73 | 71 | $this->router = $router; |
| 74 | 72 | } |
| 75 | 73 | |
@@ -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 | } |