@@ -43,8 +43,7 @@ discard block |
||
43 | 43 | * @class AccessTokenRequestHandler |
44 | 44 | * @package Platine\Framework\OAuth2\Handler |
45 | 45 | */ |
46 | -class AccessTokenRequestHandler implements RequestHandlerInterface |
|
47 | -{ |
|
46 | +class AccessTokenRequestHandler implements RequestHandlerInterface { |
|
48 | 47 | /** |
49 | 48 | * The Authorization Server |
50 | 49 | * @var AuthorizationServerInterface |
@@ -55,8 +54,7 @@ discard block |
||
55 | 54 | * Create new instance |
56 | 55 | * @param AuthorizationServerInterface $authorizationServer |
57 | 56 | */ |
58 | - public function __construct(AuthorizationServerInterface $authorizationServer) |
|
59 | - { |
|
57 | + public function __construct(AuthorizationServerInterface $authorizationServer) { |
|
60 | 58 | $this->authorizationServer = $authorizationServer; |
61 | 59 | } |
62 | 60 |
@@ -43,8 +43,7 @@ discard block |
||
43 | 43 | * @class AuthorizationRequestHandler |
44 | 44 | * @package Platine\Framework\OAuth2\Handler |
45 | 45 | */ |
46 | -class AuthorizationRequestHandler implements RequestHandlerInterface |
|
47 | -{ |
|
46 | +class AuthorizationRequestHandler implements RequestHandlerInterface { |
|
48 | 47 | /** |
49 | 48 | * The Authorization Server |
50 | 49 | * @var AuthorizationServerInterface |
@@ -55,8 +54,7 @@ discard block |
||
55 | 54 | * Create new instance |
56 | 55 | * @param AuthorizationServerInterface $authorizationServer |
57 | 56 | */ |
58 | - public function __construct(AuthorizationServerInterface $authorizationServer) |
|
59 | - { |
|
57 | + public function __construct(AuthorizationServerInterface $authorizationServer) { |
|
60 | 58 | $this->authorizationServer = $authorizationServer; |
61 | 59 | } |
62 | 60 |
@@ -120,7 +120,7 @@ |
||
120 | 120 | */ |
121 | 121 | protected function shouldBeProcessed(ServerRequestInterface $request): bool |
122 | 122 | { |
123 | - //If no route has been match no need check |
|
123 | + //If no route has been match no need check |
|
124 | 124 | /** @var Route|null $route */ |
125 | 125 | $route = $request->getAttribute(Route::class); |
126 | 126 | if ($route === null) { |
@@ -49,8 +49,7 @@ |
||
49 | 49 | * @package Platine\Framework\OAuth2\Middleware |
50 | 50 | * @template T |
51 | 51 | */ |
52 | -class OauthResourceMiddleware implements MiddlewareInterface |
|
53 | -{ |
|
52 | +class OauthResourceMiddleware implements MiddlewareInterface { |
|
54 | 53 | /** |
55 | 54 | * The Resource Server |
56 | 55 | * @var ResourceServerInterface |
@@ -53,8 +53,7 @@ discard block |
||
53 | 53 | * @class TokenOwner |
54 | 54 | * @package Platine\Framework\OAuth2\User |
55 | 55 | */ |
56 | -class TokenOwner implements TokenOwnerInterface |
|
57 | -{ |
|
56 | +class TokenOwner implements TokenOwnerInterface { |
|
58 | 57 | /** |
59 | 58 | * The owner id |
60 | 59 | * @var mixed |
@@ -65,16 +64,14 @@ discard block |
||
65 | 64 | * Create new instance |
66 | 65 | * @param mixed|null $id |
67 | 66 | */ |
68 | - public function __construct($id = null) |
|
69 | - { |
|
67 | + public function __construct($id = null) { |
|
70 | 68 | $this->id = $id; |
71 | 69 | } |
72 | 70 | |
73 | 71 | /** |
74 | 72 | * {@inheritdoc} |
75 | 73 | */ |
76 | - public function getOwnerId() |
|
77 | - { |
|
74 | + public function getOwnerId() { |
|
78 | 75 | return $this->id; |
79 | 76 | } |
80 | 77 | } |
@@ -56,8 +56,7 @@ discard block |
||
56 | 56 | * @class UserAuthentication |
57 | 57 | * @package Platine\Framework\OAuth2\User |
58 | 58 | */ |
59 | -class UserAuthentication implements UserAuthenticationInterface |
|
60 | -{ |
|
59 | +class UserAuthentication implements UserAuthenticationInterface { |
|
61 | 60 | /** |
62 | 61 | * The Authentication |
63 | 62 | * @var AuthenticationInterface |
@@ -68,8 +67,7 @@ discard block |
||
68 | 67 | * Create new instance |
69 | 68 | * @param AuthenticationInterface $authentication |
70 | 69 | */ |
71 | - public function __construct(AuthenticationInterface $authentication) |
|
72 | - { |
|
70 | + public function __construct(AuthenticationInterface $authentication) { |
|
73 | 71 | $this->authentication = $authentication; |
74 | 72 | } |
75 | 73 |
@@ -59,8 +59,7 @@ |
||
59 | 59 | * @package Platine\Framework\Task\Command |
60 | 60 | * @template T |
61 | 61 | */ |
62 | -abstract class AbstractCommand extends Command |
|
63 | -{ |
|
62 | +abstract class AbstractCommand extends Command { |
|
64 | 63 | /** |
65 | 64 | * The scheduler instance |
66 | 65 | * @var SchedulerInterface |
@@ -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) { |
@@ -59,8 +59,7 @@ discard block |
||
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 | * The SecurityPolicy instance |
66 | 65 | * @var SecurityPolicy<T> |
@@ -71,8 +70,7 @@ discard block |
||
71 | 70 | * Create new instance |
72 | 71 | * @param SecurityPolicy<T> $securityPolicy |
73 | 72 | */ |
74 | - public function __construct(SecurityPolicy $securityPolicy) |
|
75 | - { |
|
73 | + public function __construct(SecurityPolicy $securityPolicy) { |
|
76 | 74 | $this->securityPolicy = $securityPolicy; |
77 | 75 | } |
78 | 76 |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | return []; |
151 | 151 | } |
152 | 152 | |
153 | - $policy = new FeaturePermissionPolicy($config); |
|
153 | + $policy = new FeaturePermissionPolicy($config); |
|
154 | 154 | |
155 | 155 | return ['Permissions-Policy' => $policy->headers()]; |
156 | 156 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | return []; |
168 | 168 | } |
169 | 169 | |
170 | - $policy = new StrictTransportSecurityPolicy($config); |
|
170 | + $policy = new StrictTransportSecurityPolicy($config); |
|
171 | 171 | |
172 | 172 | return ['Strict-Transport-Security' => $policy->headers()]; |
173 | 173 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | return []; |
186 | 186 | } |
187 | 187 | |
188 | - $policy = new ClearSiteDataPolicy($config); |
|
188 | + $policy = new ClearSiteDataPolicy($config); |
|
189 | 189 | |
190 | 190 | return ['Clear-Site-Data' => $policy->headers()]; |
191 | 191 | } |
@@ -61,8 +61,7 @@ |
||
61 | 61 | * @package Platine\Framework\Security |
62 | 62 | * @template T |
63 | 63 | */ |
64 | -class SecurityPolicy |
|
65 | -{ |
|
64 | +class SecurityPolicy { |
|
66 | 65 | /** |
67 | 66 | * The application configuration |
68 | 67 | * @var Config<T> |
@@ -52,8 +52,7 @@ |
||
52 | 52 | * @class StrictTransportSecurityPolicy |
53 | 53 | * @package Platine\Framework\Security\Policy |
54 | 54 | */ |
55 | -class StrictTransportSecurityPolicy extends AbstractPolicy |
|
56 | -{ |
|
55 | +class StrictTransportSecurityPolicy extends AbstractPolicy { |
|
57 | 56 | /** |
58 | 57 | * {@inheritdoc} |
59 | 58 | */ |