@@ -54,14 +54,12 @@ |
||
| 54 | 54 | * @class AbstractValidator |
| 55 | 55 | * @package Platine\Framework\Form\Validator |
| 56 | 56 | */ |
| 57 | -abstract class AbstractValidator extends Validator |
|
| 58 | -{ |
|
| 57 | +abstract class AbstractValidator extends Validator { |
|
| 59 | 58 | /** |
| 60 | 59 | * Create new instance |
| 61 | 60 | * @param Lang $lang |
| 62 | 61 | */ |
| 63 | - public function __construct(Lang $lang) |
|
| 64 | - { |
|
| 62 | + public function __construct(Lang $lang) { |
|
| 65 | 63 | parent::__construct($lang); |
| 66 | 64 | } |
| 67 | 65 | |
@@ -65,8 +65,7 @@ |
||
| 65 | 65 | * @package Platine\Framework\Http\Middleware |
| 66 | 66 | * @template T |
| 67 | 67 | */ |
| 68 | -class CsrfMiddleware implements MiddlewareInterface |
|
| 69 | -{ |
|
| 68 | +class CsrfMiddleware implements MiddlewareInterface { |
|
| 70 | 69 | |
| 71 | 70 | /** |
| 72 | 71 | * The configuration instance |
@@ -183,7 +183,7 @@ |
||
| 183 | 183 | */ |
| 184 | 184 | protected function shouldBeProcessed(ServerRequestInterface $request): bool |
| 185 | 185 | { |
| 186 | - //If no route has been match no need check for CSRF |
|
| 186 | + //If no route has been match no need check for CSRF |
|
| 187 | 187 | /** @var ?Route $route */ |
| 188 | 188 | $route = $request->getAttribute(Route::class); |
| 189 | 189 | if (!$route) { |
@@ -55,16 +55,14 @@ |
||
| 55 | 55 | * @class FileResponse |
| 56 | 56 | * @package Platine\Framework\Http\Response |
| 57 | 57 | */ |
| 58 | -class FileResponse extends Response |
|
| 59 | -{ |
|
| 58 | +class FileResponse extends Response { |
|
| 60 | 59 | |
| 61 | 60 | /** |
| 62 | 61 | * Create new instance |
| 63 | 62 | * @param string $path |
| 64 | 63 | * @param string|null $filename |
| 65 | 64 | */ |
| 66 | - public function __construct(string $path, ?string $filename = null) |
|
| 67 | - { |
|
| 65 | + public function __construct(string $path, ?string $filename = null) { |
|
| 68 | 66 | parent::__construct(200); |
| 69 | 67 | |
| 70 | 68 | $realpath = Path::realPath($path); |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | |
| 83 | 83 | $this->headers['Content-Description'] = ['File Transfer']; |
| 84 | 84 | $this->headers['Content-Type'] = [$mimetype]; |
| 85 | - $this->headers['Content-Disposition'] = ['attachment; filename="' . $filename . '"']; |
|
| 85 | + $this->headers['Content-Disposition'] = ['attachment; filename="' . $filename . '"']; |
|
| 86 | 86 | $this->headers['Expires'] = ['0']; |
| 87 | 87 | $this->headers['Cache-Control'] = ['must-revalidate']; |
| 88 | 88 | $this->headers['Pragma'] = ['public']; |
@@ -54,8 +54,7 @@ |
||
| 54 | 54 | * @class SecurityServiceProvider |
| 55 | 55 | * @package Platine\Framework\Service\Provider |
| 56 | 56 | */ |
| 57 | -class SecurityServiceProvider extends ServiceProvider |
|
| 58 | -{ |
|
| 57 | +class SecurityServiceProvider extends ServiceProvider { |
|
| 59 | 58 | |
| 60 | 59 | /** |
| 61 | 60 | * {@inheritdoc} |
@@ -57,8 +57,7 @@ |
||
| 57 | 57 | * @class CsrfTag |
| 58 | 58 | * @package Platine\Framework\Template\Tag |
| 59 | 59 | */ |
| 60 | -class CsrfTag extends AbstractTag |
|
| 61 | -{ |
|
| 60 | +class CsrfTag extends AbstractTag { |
|
| 62 | 61 | |
| 63 | 62 | /** |
| 64 | 63 | * {@inheritdoc} |
@@ -53,8 +53,7 @@ discard block |
||
| 53 | 53 | * @class Flash |
| 54 | 54 | * @package Platine\Framework\Helper |
| 55 | 55 | */ |
| 56 | -class Flash |
|
| 57 | -{ |
|
| 56 | +class Flash { |
|
| 58 | 57 | |
| 59 | 58 | /** |
| 60 | 59 | * The session instance |
@@ -66,8 +65,7 @@ discard block |
||
| 66 | 65 | * Create new instance |
| 67 | 66 | * @param Session $session |
| 68 | 67 | */ |
| 69 | - public function __construct(Session $session) |
|
| 70 | - { |
|
| 68 | + public function __construct(Session $session) { |
|
| 71 | 69 | $this->session = $session; |
| 72 | 70 | } |
| 73 | 71 | |
@@ -61,8 +61,7 @@ |
||
| 61 | 61 | * @package Platine\Framework\Http\Middleware |
| 62 | 62 | * @template T |
| 63 | 63 | */ |
| 64 | -class CorsMiddleware implements MiddlewareInterface |
|
| 65 | -{ |
|
| 64 | +class CorsMiddleware implements MiddlewareInterface { |
|
| 66 | 65 | |
| 67 | 66 | /** |
| 68 | 67 | * The configuration instance |
@@ -162,14 +162,14 @@ |
||
| 162 | 162 | { |
| 163 | 163 | if ($this->isPreflight()) { |
| 164 | 164 | $this->setOrigin() |
| 165 | - ->setMaxAge() |
|
| 166 | - ->setAllowCredentials() |
|
| 167 | - ->setAllowMethods() |
|
| 168 | - ->setAllowHeaders(); |
|
| 165 | + ->setMaxAge() |
|
| 166 | + ->setAllowCredentials() |
|
| 167 | + ->setAllowMethods() |
|
| 168 | + ->setAllowHeaders(); |
|
| 169 | 169 | } else { |
| 170 | 170 | $this->setOrigin() |
| 171 | - ->setExposedHeaders() |
|
| 172 | - ->setAllowCredentials(); |
|
| 171 | + ->setExposedHeaders() |
|
| 172 | + ->setAllowCredentials(); |
|
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | |
@@ -54,8 +54,7 @@ |
||
| 54 | 54 | * @class JsonResponse |
| 55 | 55 | * @package Platine\Framework\Http\Response |
| 56 | 56 | */ |
| 57 | -class JsonResponse extends Response |
|
| 58 | -{ |
|
| 57 | +class JsonResponse extends Response { |
|
| 59 | 58 | |
| 60 | 59 | /** |
| 61 | 60 | * Create new instance |
@@ -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 | /** |
| 61 | 60 | * The template instance |