@@ -55,8 +55,7 @@ |
||
| 55 | 55 | * class HtmlErrorRenderer |
| 56 | 56 | * @package Platine\Framework\Handler\Error\Renderer |
| 57 | 57 | */ |
| 58 | -class HtmlErrorRenderer extends AbstractErrorRenderer |
|
| 59 | -{ |
|
| 58 | +class HtmlErrorRenderer extends AbstractErrorRenderer { |
|
| 60 | 59 | |
| 61 | 60 | /** |
| 62 | 61 | * {@inheritdoc} |
@@ -55,8 +55,7 @@ |
||
| 55 | 55 | * class AbstractErrorRenderer |
| 56 | 56 | * @package Platine\Framework\Handler\Error\Renderer |
| 57 | 57 | */ |
| 58 | -abstract class AbstractErrorRenderer implements ErrorRenderInterface |
|
| 59 | -{ |
|
| 58 | +abstract class AbstractErrorRenderer implements ErrorRenderInterface { |
|
| 60 | 59 | |
| 61 | 60 | /** |
| 62 | 61 | * The default error title |
@@ -55,8 +55,7 @@ |
||
| 55 | 55 | * class JsonErrorRenderer |
| 56 | 56 | * @package Platine\Framework\Handler\Error\Renderer |
| 57 | 57 | */ |
| 58 | -class JsonErrorRenderer extends AbstractErrorRenderer |
|
| 59 | -{ |
|
| 58 | +class JsonErrorRenderer extends AbstractErrorRenderer { |
|
| 60 | 59 | |
| 61 | 60 | /** |
| 62 | 61 | * {@inheritdoc} |
@@ -60,8 +60,7 @@ discard block |
||
| 60 | 60 | * class AbstractApplication |
| 61 | 61 | * @package Platine\Framework\App |
| 62 | 62 | */ |
| 63 | -abstract class AbstractApplication extends Container |
|
| 64 | -{ |
|
| 63 | +abstract class AbstractApplication extends Container { |
|
| 65 | 64 | |
| 66 | 65 | /** |
| 67 | 66 | * The application version |
@@ -108,8 +107,7 @@ discard block |
||
| 108 | 107 | * Create new instance |
| 109 | 108 | * @param string|null $basePath |
| 110 | 109 | */ |
| 111 | - public function __construct(?string $basePath = null) |
|
| 112 | - { |
|
| 110 | + public function __construct(?string $basePath = null) { |
|
| 113 | 111 | parent::__construct(); |
| 114 | 112 | $this->loadCoreServiceProviders(); |
| 115 | 113 | $this->loadConfiguredServiceProviders(); |
@@ -62,8 +62,7 @@ discard block |
||
| 62 | 62 | * class Application |
| 63 | 63 | * @package Platine\Framework\App |
| 64 | 64 | */ |
| 65 | -class Application extends AbstractApplication implements RequestHandlerInterface |
|
| 66 | -{ |
|
| 65 | +class Application extends AbstractApplication implements RequestHandlerInterface { |
|
| 67 | 66 | |
| 68 | 67 | /** |
| 69 | 68 | * The router instance |
@@ -81,8 +80,7 @@ discard block |
||
| 81 | 80 | * Create new instance |
| 82 | 81 | * @param string|null $basePath |
| 83 | 82 | */ |
| 84 | - public function __construct(?string $basePath = null) |
|
| 85 | - { |
|
| 83 | + public function __construct(?string $basePath = null) { |
|
| 86 | 84 | parent::__construct($basePath); |
| 87 | 85 | $this->loadConfiguredMiddlewares(); |
| 88 | 86 | $this->setRouting(); |
@@ -148,7 +148,7 @@ |
||
| 148 | 148 | ServerRequestInterface $request, |
| 149 | 149 | RequestHandlerInterface $handler |
| 150 | 150 | ): ResponseInterface { |
| 151 | - set_error_handler(static function (int $severity, string $message, string $file, int $line): bool { |
|
| 151 | + set_error_handler(static function(int $severity, string $message, string $file, int $line): bool { |
|
| 152 | 152 | // https://www.php.net/manual/en/function.error-reporting.php#8866 |
| 153 | 153 | // Usages the defined levels of `error_reporting()`. |
| 154 | 154 | if (!(error_reporting() & $severity)) { |
@@ -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 | /** |
| 70 | 69 | * The logger instance to use to save error |
@@ -101,8 +100,7 @@ discard block |
||
| 101 | 100 | * @param bool $detail |
| 102 | 101 | * @param LoggerInterface $logger |
| 103 | 102 | */ |
| 104 | - public function __construct(bool $detail, LoggerInterface $logger) |
|
| 105 | - { |
|
| 103 | + public function __construct(bool $detail, LoggerInterface $logger) { |
|
| 106 | 104 | $this->detail = $detail; |
| 107 | 105 | $this->logger = $logger; |
| 108 | 106 | $this->errorHandler = $this->getDefaultErrorHanlder(); |
@@ -61,8 +61,7 @@ discard block |
||
| 61 | 61 | * class RouteMatchMiddleware |
| 62 | 62 | * @package Platine\Framework\Http\Middleware |
| 63 | 63 | */ |
| 64 | -class RouteMatchMiddleware implements MiddlewareInterface |
|
| 65 | -{ |
|
| 64 | +class RouteMatchMiddleware implements MiddlewareInterface { |
|
| 66 | 65 | |
| 67 | 66 | /** |
| 68 | 67 | * The Router instance |
@@ -81,8 +80,7 @@ discard block |
||
| 81 | 80 | * @param Router $router |
| 82 | 81 | * @param array<string> $allowedMethods the default allowed methods |
| 83 | 82 | */ |
| 84 | - public function __construct(Router $router, array $allowedMethods = ['HEAD']) |
|
| 85 | - { |
|
| 83 | + public function __construct(Router $router, array $allowedMethods = ['HEAD']) { |
|
| 86 | 84 | $this->router = $router; |
| 87 | 85 | |
| 88 | 86 | 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 CallableResolverInterface $resolver |
| 74 | 73 | */ |
| 75 | - public function __construct(CallableResolverInterface $resolver) |
|
| 76 | - { |
|
| 74 | + public function __construct(CallableResolverInterface $resolver) { |
|
| 77 | 75 | $this->resolver = $resolver; |
| 78 | 76 | } |
| 79 | 77 | |
@@ -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 |