@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Damax\Bundle\ApiAuthBundle\DependencyInjection; |
6 | 6 |
@@ -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 | namespace Damax\Bundle\ApiAuthBundle\DependencyInjection; |
6 | 6 | |
@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | return (new ArrayNodeDefinition($name)) |
39 | 39 | ->canBeEnabled() |
40 | 40 | ->beforeNormalization() |
41 | - ->ifTrue(function (array $config): bool { |
|
41 | + ->ifTrue(function(array $config): bool { |
|
42 | 42 | return !isset($config['tokens']); |
43 | 43 | }) |
44 | - ->then(function (array $config): array { |
|
44 | + ->then(function(array $config): array { |
|
45 | 45 | $enabled = $config['enabled']; |
46 | 46 | |
47 | 47 | unset($config['enabled']); |
@@ -111,12 +111,12 @@ discard block |
||
111 | 111 | ->arrayNode('signer') |
112 | 112 | ->isRequired() |
113 | 113 | ->beforeNormalization() |
114 | - ->ifTrue(function (?array $config): bool { |
|
114 | + ->ifTrue(function(?array $config): bool { |
|
115 | 115 | $type = $config['type'] ?? self::SIGNER_SYMMETRIC; |
116 | 116 | |
117 | 117 | return self::SIGNER_ASYMMETRIC === $type; |
118 | 118 | }) |
119 | - ->then(function (array $config): array { |
|
119 | + ->then(function(array $config): array { |
|
120 | 120 | if (isset($config['signing_key'])) { |
121 | 121 | $config['signing_key'] = 'file://' . $config['signing_key']; |
122 | 122 | } |
@@ -129,25 +129,25 @@ discard block |
||
129 | 129 | }) |
130 | 130 | ->end() |
131 | 131 | ->validate() |
132 | - ->ifTrue(function (array $config): bool { |
|
132 | + ->ifTrue(function(array $config): bool { |
|
133 | 133 | return self::SIGNER_ASYMMETRIC === $config['type'] && empty($config['verification_key']); |
134 | 134 | }) |
135 | 135 | ->thenInvalid('Verification key must be specified for "asymmetric" signer.') |
136 | 136 | ->end() |
137 | 137 | ->validate() |
138 | - ->ifTrue(function (array $config): bool { |
|
138 | + ->ifTrue(function(array $config): bool { |
|
139 | 139 | return self::SIGNER_SYMMETRIC === $config['type'] && !in_array($config['algorithm'], self::SYMMETRIC_ALGOS); |
140 | 140 | }) |
141 | 141 | ->thenInvalid('HMAC algorithm must be specified for "symmetric" signer.') |
142 | 142 | ->end() |
143 | 143 | ->validate() |
144 | - ->ifTrue(function (array $config): bool { |
|
144 | + ->ifTrue(function(array $config): bool { |
|
145 | 145 | return self::SIGNER_ASYMMETRIC === $config['type'] && !in_array($config['algorithm'], self::ASYMMETRIC_ALGOS); |
146 | 146 | }) |
147 | 147 | ->thenInvalid('RSA or ECDSA algorithm must be specified for "asymmetric" signer.') |
148 | 148 | ->end() |
149 | 149 | ->validate() |
150 | - ->ifTrue(function (array $config): bool { |
|
150 | + ->ifTrue(function(array $config): bool { |
|
151 | 151 | if (self::SIGNER_SYMMETRIC === $config['type']) { |
152 | 152 | return false; |
153 | 153 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Damax\Bundle\ApiAuthBundle\Tests\DependencyInjection; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Damax\Bundle\ApiAuthBundle\Tests\Security\ApiKey; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Damax\Bundle\ApiAuthBundle\Tests\Security\ApiKey; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Damax\Bundle\ApiAuthBundle\Tests\Security; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Damax\Bundle\ApiAuthBundle\Tests\Security\Jwt; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Damax\Bundle\ApiAuthBundle\Tests\Extractor; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Damax\Bundle\ApiAuthBundle\Tests\Extractor; |
6 | 6 |