@@ -40,8 +40,7 @@ |
||
40 | 40 | * 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 |
@@ -40,8 +40,7 @@ |
||
40 | 40 | * 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 | * HttpSpecialException |
41 | 41 | * @package Platine\Framework\Http\Exception |
42 | 42 | */ |
43 | -abstract class HttpSpecialException extends HttpException |
|
44 | -{ |
|
43 | +abstract class HttpSpecialException extends HttpException { |
|
45 | 44 | /** |
46 | 45 | * Create new instance |
47 | 46 | * @param ServerRequestInterface $request |
@@ -41,8 +41,7 @@ |
||
41 | 41 | * HttpException |
42 | 42 | * @package Platine\Framework\Http\Exception |
43 | 43 | */ |
44 | -class HttpException extends Exception |
|
45 | -{ |
|
44 | +class HttpException extends Exception { |
|
46 | 45 | /** |
47 | 46 | * The instance of server request that throw this exception |
48 | 47 | * @var ServerRequestInterface |
@@ -55,8 +55,7 @@ discard block |
||
55 | 55 | * class RequestData |
56 | 56 | * @package Platine\Framework\Http |
57 | 57 | */ |
58 | -class RequestData |
|
59 | -{ |
|
58 | +class RequestData { |
|
60 | 59 | |
61 | 60 | /** |
62 | 61 | * The request body or post data |
@@ -86,8 +85,7 @@ discard block |
||
86 | 85 | * Create new instance |
87 | 86 | * @param ServerRequestInterface $request |
88 | 87 | */ |
89 | - public function __construct(ServerRequestInterface $request) |
|
90 | - { |
|
88 | + public function __construct(ServerRequestInterface $request) { |
|
91 | 89 | $this->posts = (array) $request->getParsedBody(); |
92 | 90 | $this->gets = $request->getQueryParams(); |
93 | 91 | $this->servers = $request->getServerParams(); |
@@ -101,8 +99,7 @@ discard block |
||
101 | 99 | * |
102 | 100 | * @return mixed |
103 | 101 | */ |
104 | - public function get(string $key, $default = null) |
|
105 | - { |
|
102 | + public function get(string $key, $default = null) { |
|
106 | 103 | return Arr::get($this->gets, $key, $default); |
107 | 104 | } |
108 | 105 | |
@@ -113,8 +110,7 @@ discard block |
||
113 | 110 | * |
114 | 111 | * @return mixed |
115 | 112 | */ |
116 | - public function post(string $key, $default = null) |
|
117 | - { |
|
113 | + public function post(string $key, $default = null) { |
|
118 | 114 | return Arr::get($this->posts, $key, $default); |
119 | 115 | } |
120 | 116 | |
@@ -125,8 +121,7 @@ discard block |
||
125 | 121 | * |
126 | 122 | * @return mixed |
127 | 123 | */ |
128 | - public function server(string $key, $default = null) |
|
129 | - { |
|
124 | + public function server(string $key, $default = null) { |
|
130 | 125 | return Arr::get($this->servers, $key, $default); |
131 | 126 | } |
132 | 127 | |
@@ -137,8 +132,7 @@ discard block |
||
137 | 132 | * |
138 | 133 | * @return mixed |
139 | 134 | */ |
140 | - public function cookie(string $key, $default = null) |
|
141 | - { |
|
135 | + public function cookie(string $key, $default = null) { |
|
142 | 136 | return Arr::get($this->cookies, $key, $default); |
143 | 137 | } |
144 | 138 | } |
@@ -55,8 +55,7 @@ |
||
55 | 55 | * class RoutingServiceProvider |
56 | 56 | * @package Platine\Framework\Service\Provider |
57 | 57 | */ |
58 | -class RoutingServiceProvider extends ServiceProvider |
|
59 | -{ |
|
58 | +class RoutingServiceProvider extends ServiceProvider { |
|
60 | 59 | |
61 | 60 | /** |
62 | 61 | * {@inheritdoc} |
@@ -64,8 +64,7 @@ |
||
64 | 64 | * class BaseServiceProvider |
65 | 65 | * @package Platine\Framework\Service\Provider |
66 | 66 | */ |
67 | -class BaseServiceProvider extends ServiceProvider |
|
68 | -{ |
|
67 | +class BaseServiceProvider extends ServiceProvider { |
|
69 | 68 | |
70 | 69 | /** |
71 | 70 | * {@inheritdoc} |
@@ -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.6.8'); |
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 | ); |
@@ -57,8 +57,7 @@ |
||
57 | 57 | * class EventServiceProvider |
58 | 58 | * @package Platine\Framework\Service\Provider |
59 | 59 | */ |
60 | -class EventServiceProvider extends ServiceProvider |
|
61 | -{ |
|
60 | +class EventServiceProvider extends ServiceProvider { |
|
62 | 61 | |
63 | 62 | /** |
64 | 63 | * {@inheritdoc} |
@@ -67,11 +67,11 @@ |
||
67 | 67 | */ |
68 | 68 | public function register(): void |
69 | 69 | { |
70 | - $this->app->bind(ErrorHandlerInterface::class, function (ContainerInterface $app) { |
|
70 | + $this->app->bind(ErrorHandlerInterface::class, function(ContainerInterface $app) { |
|
71 | 71 | return new ErrorHandler($app->get(LoggerInterface::class)); |
72 | 72 | }); |
73 | 73 | |
74 | - $this->app->bind(ErrorHandlerMiddleware::class, function (ContainerInterface $app) { |
|
74 | + $this->app->bind(ErrorHandlerMiddleware::class, function(ContainerInterface $app) { |
|
75 | 75 | return new ErrorHandlerMiddleware( |
76 | 76 | $app->get(Config::class)->get('app.debug'), |
77 | 77 | $app->get(LoggerInterface::class) |
@@ -59,8 +59,7 @@ |
||
59 | 59 | * class ErrorHandlerServiceProvider |
60 | 60 | * @package Platine\Framework\Service\Provider |
61 | 61 | */ |
62 | -class ErrorHandlerServiceProvider extends ServiceProvider |
|
63 | -{ |
|
62 | +class ErrorHandlerServiceProvider extends ServiceProvider { |
|
64 | 63 | |
65 | 64 | /** |
66 | 65 | * {@inheritdoc} |