@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | /** |
32 | 32 | * {@inheritdoc} |
33 | 33 | */ |
34 | - public function findClientId(ServerRequestInterface $request, &$clientCredentials = null): ?ClientId |
|
34 | + public function findClientId(ServerRequestInterface $request, &$clientCredentials = null): ? ClientId |
|
35 | 35 | { |
36 | 36 | $parameters = $request->getParsedBody() ?? []; |
37 | 37 | if (array_key_exists('client_id', $parameters) && !array_key_exists('client_secret', $parameters)) { |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | parent::continueConfiguration($node); |
44 | 44 | $node |
45 | 45 | ->validate() |
46 | - ->ifTrue(function ($config) { |
|
46 | + ->ifTrue(function($config) { |
|
47 | 47 | return true === $config['enabled'] && empty($config['route_name']); |
48 | 48 | }) |
49 | 49 | ->thenInvalid('The route name must be set.') |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -49,18 +49,18 @@ discard block |
||
49 | 49 | parent::continueConfiguration($node); |
50 | 50 | $node |
51 | 51 | ->validate() |
52 | - ->ifTrue(function ($config) { |
|
52 | + ->ifTrue(function($config) { |
|
53 | 53 | return true === $config['enabled'] && empty($config['path']); |
54 | 54 | }) |
55 | 55 | ->thenInvalid('The route name must be set.') |
56 | 56 | ->end() |
57 | 57 | ->validate() |
58 | - ->ifTrue(function ($config) { |
|
58 | + ->ifTrue(function($config) { |
|
59 | 59 | return true === $config['enabled'] && empty($config['storage_name']); |
60 | 60 | })->thenInvalid('The option "storage_name" must be set.') |
61 | 61 | ->end() |
62 | 62 | ->validate() |
63 | - ->ifTrue(function ($config) { |
|
63 | + ->ifTrue(function($config) { |
|
64 | 64 | return true === $config['enabled'] && empty($config['template']); |
65 | 65 | })->thenInvalid('The option "template" must be set.') |
66 | 66 | ->end() |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | parent::continueConfiguration($node); |
51 | 51 | $node |
52 | 52 | ->validate() |
53 | - ->ifTrue(function ($config) { |
|
53 | + ->ifTrue(function($config) { |
|
54 | 54 | return true === $config['enabled'] && empty($config['realm']); |
55 | 55 | }) |
56 | 56 | ->thenInvalid('The option "realm" must be set.') |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -50,13 +50,13 @@ discard block |
||
50 | 50 | parent::continueConfiguration($node); |
51 | 51 | $node |
52 | 52 | ->validate() |
53 | - ->ifTrue(function ($config) { |
|
53 | + ->ifTrue(function($config) { |
|
54 | 54 | return $config['min_length'] > $config['max_length']; |
55 | 55 | }) |
56 | 56 | ->thenInvalid('The option "min_length" must not be greater than "max_length".') |
57 | 57 | ->end() |
58 | 58 | ->validate() |
59 | - ->ifTrue(function ($config) { |
|
59 | + ->ifTrue(function($config) { |
|
60 | 60 | return !in_array($config['algorithm'], ['hmac-sha-256', 'hmac-sha-1']); |
61 | 61 | }) |
62 | 62 | ->thenInvalid('The algorithm is not supported. Please use one of the following one: "hmac-sha-1", "hmac-sha-256".') |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $node |
46 | 46 | ->addDefaultsIfNotSet() |
47 | 47 | ->validate() |
48 | - ->ifTrue(function ($config) { |
|
48 | + ->ifTrue(function($config) { |
|
49 | 49 | return true === $config['enabled'] && empty($config['repository']); |
50 | 50 | }) |
51 | 51 | ->thenInvalid('The option "repository" must be set.') |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | parent::continueConfiguration($node); |
45 | 45 | $node |
46 | 46 | ->validate() |
47 | - ->ifTrue(function ($config) { |
|
47 | + ->ifTrue(function($config) { |
|
48 | 48 | return true === $config['enabled'] && empty($config['service']); |
49 | 49 | }) |
50 | 50 | ->thenInvalid('The pairwise subject service must be set.') |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -46,19 +46,19 @@ discard block |
||
46 | 46 | parent::continueConfiguration($node); |
47 | 47 | $node |
48 | 48 | ->validate() |
49 | - ->ifTrue(function ($config) { |
|
49 | + ->ifTrue(function($config) { |
|
50 | 50 | return true === $config['enabled'] && empty($config['key_encryption_algorithms']); |
51 | 51 | }) |
52 | 52 | ->thenInvalid('At least one key encryption algorithm must be set.') |
53 | 53 | ->end() |
54 | 54 | ->validate() |
55 | - ->ifTrue(function ($config) { |
|
55 | + ->ifTrue(function($config) { |
|
56 | 56 | return true === $config['enabled'] && empty($config['content_encryption_algorithms']); |
57 | 57 | }) |
58 | 58 | ->thenInvalid('At least one content encryption algorithm must be set.') |
59 | 59 | ->end() |
60 | 60 | ->validate() |
61 | - ->ifTrue(function ($config) { |
|
61 | + ->ifTrue(function($config) { |
|
62 | 62 | return true === $config['enabled'] && empty($config['key_set']); |
63 | 63 | }) |
64 | 64 | ->thenInvalid('The KeySet must be set.') |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /* |
6 | 6 | * The MIT License (MIT) |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | /** |
87 | 87 | * {@inheritdoc} |
88 | 88 | */ |
89 | - public function create(ResourceOwnerId $resourceOwnerId, ClientId $clientId, DataBag $parameters, DataBag $metadatas, array $scopes, ?ResourceServerId $resourceServerId, ?\DateTimeImmutable $expiresAt): RefreshToken |
|
89 | + public function create(ResourceOwnerId $resourceOwnerId, ClientId $clientId, DataBag $parameters, DataBag $metadatas, array $scopes, ? ResourceServerId $resourceServerId, ? \DateTimeImmutable $expiresAt) : RefreshToken |
|
90 | 90 | { |
91 | 91 | if (null === $expiresAt) { |
92 | 92 | $expiresAt = new \DateTimeImmutable(sprintf('now +%u seconds', $this->lifetime)); |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | * |
156 | 156 | * @return RefreshToken|null |
157 | 157 | */ |
158 | - private function getFromCache(RefreshTokenId $refreshTokenId): ?RefreshToken |
|
158 | + private function getFromCache(RefreshTokenId $refreshTokenId): ? RefreshToken |
|
159 | 159 | { |
160 | 160 | $itemKey = sprintf('oauth2-refresh_token-%s', $refreshTokenId->getValue()); |
161 | 161 | if (null !== $this->cache) { |