@@ -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 |
@@ -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 |
@@ -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 | } |