@@ -62,8 +62,7 @@ |
||
62 | 62 | * @package Platine\Framework\Auth\Middleware |
63 | 63 | * @template T |
64 | 64 | */ |
65 | -class AuthorizationMiddleware implements MiddlewareInterface |
|
66 | -{ |
|
65 | +class AuthorizationMiddleware implements MiddlewareInterface { |
|
67 | 66 | /** |
68 | 67 | * Create new instance |
69 | 68 | * @param AuthorizationInterface $authorization |
@@ -61,8 +61,7 @@ |
||
61 | 61 | * @package Platine\Framework\Auth\Middleware |
62 | 62 | * @template T |
63 | 63 | */ |
64 | -class ApiAuthenticationMiddleware implements MiddlewareInterface |
|
65 | -{ |
|
64 | +class ApiAuthenticationMiddleware implements MiddlewareInterface { |
|
66 | 65 | /** |
67 | 66 | * Create new instance |
68 | 67 | * @param ApiAuthenticationInterface $authentication |
@@ -62,8 +62,7 @@ |
||
62 | 62 | * @package Platine\Framework\Auth\Middleware |
63 | 63 | * @template T |
64 | 64 | */ |
65 | -class AuthenticationMiddleware implements MiddlewareInterface |
|
66 | -{ |
|
65 | +class AuthenticationMiddleware implements MiddlewareInterface { |
|
67 | 66 | /** |
68 | 67 | * Create new instance |
69 | 68 | * @param AuthenticationInterface $authentication |
@@ -53,8 +53,7 @@ |
||
53 | 53 | * @class AbstractValidator |
54 | 54 | * @package Platine\Framework\Form\Validator |
55 | 55 | */ |
56 | -abstract class AbstractValidator extends Validator |
|
57 | -{ |
|
56 | +abstract class AbstractValidator extends Validator { |
|
58 | 57 | /** |
59 | 58 | * {@inheritdoc} |
60 | 59 | * @return bool |
@@ -59,14 +59,12 @@ |
||
59 | 59 | * @package Platine\Framework\Form\Param |
60 | 60 | * @template TEntity as Entity |
61 | 61 | */ |
62 | -class BaseParam implements JsonSerializable |
|
63 | -{ |
|
62 | +class BaseParam implements JsonSerializable { |
|
64 | 63 | /** |
65 | 64 | * Create new instance |
66 | 65 | * @param array<string, mixed> $data |
67 | 66 | */ |
68 | - public function __construct(array $data = []) |
|
69 | - { |
|
67 | + public function __construct(array $data = []) { |
|
70 | 68 | // Load default values |
71 | 69 | $this->loadDefaultValues(); |
72 | 70 |
@@ -207,9 +207,9 @@ |
||
207 | 207 | if ($type !== null && $type->isBuiltin()) { |
208 | 208 | $props[$property->getName()] = [ |
209 | 209 | $type->getName(), |
210 | - $type->allowsNull(), |
|
211 | - $property, |
|
212 | - ]; |
|
210 | + $type->allowsNull(), |
|
211 | + $property, |
|
212 | + ]; |
|
213 | 213 | } |
214 | 214 | } |
215 | 215 |
@@ -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 | * The request body or post data |
61 | 60 | * @var array<string, mixed> |
@@ -96,8 +95,7 @@ discard block |
||
96 | 95 | * Create new instance |
97 | 96 | * @param ServerRequestInterface $request |
98 | 97 | */ |
99 | - public function __construct(ServerRequestInterface $request) |
|
100 | - { |
|
98 | + public function __construct(ServerRequestInterface $request) { |
|
101 | 99 | $this->posts = (array) $request->getParsedBody(); |
102 | 100 | $this->gets = $request->getQueryParams(); |
103 | 101 | $this->servers = $request->getServerParams(); |
@@ -55,14 +55,12 @@ |
||
55 | 55 | * @class RouteHelper |
56 | 56 | * @package Platine\Framework\Http |
57 | 57 | */ |
58 | -class RouteHelper |
|
59 | -{ |
|
58 | +class RouteHelper { |
|
60 | 59 | /** |
61 | 60 | * Create new instance |
62 | 61 | * @param Router $router |
63 | 62 | */ |
64 | - public function __construct(protected Router $router) |
|
65 | - { |
|
63 | + public function __construct(protected Router $router) { |
|
66 | 64 | } |
67 | 65 | |
68 | 66 | /** |
@@ -123,7 +123,7 @@ |
||
123 | 123 | */ |
124 | 124 | protected function shouldBeProcessed(ServerRequestInterface $request): bool |
125 | 125 | { |
126 | - //If no route has been match no need check for CSRF |
|
126 | + //If no route has been match no need check for CSRF |
|
127 | 127 | /** @var Route|null $route */ |
128 | 128 | $route = $request->getAttribute(Route::class); |
129 | 129 | if ($route === null) { |
@@ -64,8 +64,7 @@ |
||
64 | 64 | * @package Platine\Framework\Http\Middleware |
65 | 65 | * @template T |
66 | 66 | */ |
67 | -class CsrfMiddleware implements MiddlewareInterface |
|
68 | -{ |
|
67 | +class CsrfMiddleware implements MiddlewareInterface { |
|
69 | 68 | /** |
70 | 69 | * The request instance to use |
71 | 70 | * @var ServerRequestInterface |
@@ -59,14 +59,12 @@ |
||
59 | 59 | * @package Platine\Framework\Http\Middleware |
60 | 60 | * @template T |
61 | 61 | */ |
62 | -class SecurityPolicyMiddleware implements MiddlewareInterface |
|
63 | -{ |
|
62 | +class SecurityPolicyMiddleware implements MiddlewareInterface { |
|
64 | 63 | /** |
65 | 64 | * Create new instance |
66 | 65 | * @param SecurityPolicy<T> $securityPolicy |
67 | 66 | */ |
68 | - public function __construct(protected SecurityPolicy $securityPolicy) |
|
69 | - { |
|
67 | + public function __construct(protected SecurityPolicy $securityPolicy) { |
|
70 | 68 | } |
71 | 69 | |
72 | 70 | /** |
@@ -123,7 +123,7 @@ |
||
123 | 123 | */ |
124 | 124 | protected function shouldBeProcessed(ServerRequestInterface $request): bool |
125 | 125 | { |
126 | - //If no route has been match no need check for CSRF |
|
126 | + //If no route has been match no need check for CSRF |
|
127 | 127 | /** @var Route|null $route */ |
128 | 128 | $route = $request->getAttribute(Route::class); |
129 | 129 | if ($route === null) { |