@@ -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) |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $loader->load('services.yml'); |
58 | 58 | |
59 | 59 | $parameters = [ |
60 | - 'oauth2_server.simple_string_access_token.token_manager' => ['type' => 'alias', 'path' => '[manager]'], |
|
60 | + 'oauth2_server.simple_string_access_token.token_manager' => ['type' => 'alias', 'path' => '[manager]'], |
|
61 | 61 | 'oauth2_server.simple_string_access_token.token_class' => ['type' => 'parameter', 'path' => '[class]'], |
62 | 62 | 'oauth2_server.simple_string_access_token.min_length' => ['type' => 'parameter', 'path' => '[min_length]'], |
63 | 63 | 'oauth2_server.simple_string_access_token.max_length' => ['type' => 'parameter', 'path' => '[max_length]'], |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | ->isRequired() |
77 | 77 | ->addDefaultsIfNotSet() |
78 | 78 | ->validate() |
79 | - ->ifTrue(function ($value) { |
|
79 | + ->ifTrue(function($value) { |
|
80 | 80 | return $value['min_length'] >= $value['max_length']; |
81 | 81 | }) |
82 | 82 | ->thenInvalid('The configuration option "min_length" must be lower than "max_length".') |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | ->end() |
100 | 100 | ->scalarNode('class') |
101 | 101 | ->validate() |
102 | - ->ifTrue(function ($value) { |
|
102 | + ->ifTrue(function($value) { |
|
103 | 103 | return !class_exists($value); |
104 | 104 | }) |
105 | 105 | ->thenInvalid('The class does not exist.') |
@@ -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) |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | $parameters = [ |
64 | - 'oauth2_server.refresh_token.token_manager' => ['type' => 'alias', 'path' => '[manager]'], |
|
64 | + 'oauth2_server.refresh_token.token_manager' => ['type' => 'alias', 'path' => '[manager]'], |
|
65 | 65 | 'oauth2_server.refresh_token.token_class' => ['type' => 'parameter', 'path' => '[class]'], |
66 | 66 | 'oauth2_server.refresh_token.min_length' => ['type' => 'parameter', 'path' => '[min_length]'], |
67 | 67 | 'oauth2_server.refresh_token.max_length' => ['type' => 'parameter', 'path' => '[max_length]'], |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | ->isRequired() |
81 | 81 | ->addDefaultsIfNotSet() |
82 | 82 | ->validate() |
83 | - ->ifTrue(function ($value) { |
|
83 | + ->ifTrue(function($value) { |
|
84 | 84 | return $value['min_length'] >= $value['max_length']; |
85 | 85 | }) |
86 | 86 | ->thenInvalid('The configuration option "min_length" must be lower than "max_length".') |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | ->scalarNode('class') |
105 | 105 | ->info('Refresh token class.') |
106 | 106 | ->validate() |
107 | - ->ifTrue(function ($value) { |
|
107 | + ->ifTrue(function($value) { |
|
108 | 108 | return !class_exists($value); |
109 | 109 | })->thenInvalid('The class does not exist.') |
110 | 110 | ->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) |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | * @param FilterControllerEvent $event |
119 | 119 | * @param string $message |
120 | 120 | */ |
121 | - private function createAuthenticationException(FilterControllerEvent &$event, $message) |
|
121 | + private function createAuthenticationException(FilterControllerEvent & $event, $message) |
|
122 | 122 | { |
123 | 123 | $schemes = $this->tokenTypeManager->getSchemes(); |
124 | 124 | $exception = new OAuth2Exception( |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | * @param FilterControllerEvent $event |
138 | 138 | * @param string $message |
139 | 139 | */ |
140 | - private function createAccessDeniedException(FilterControllerEvent &$event, $message) |
|
140 | + private function createAccessDeniedException(FilterControllerEvent & $event, $message) |
|
141 | 141 | { |
142 | 142 | $exception = new OAuth2Exception( |
143 | 143 | 403, |
@@ -154,9 +154,9 @@ discard block |
||
154 | 154 | * @param FilterControllerEvent $event |
155 | 155 | * @param OAuth2Exception $exception |
156 | 156 | */ |
157 | - private function updateFilterControllerEvent(FilterControllerEvent &$event, OAuth2Exception $exception) |
|
157 | + private function updateFilterControllerEvent(FilterControllerEvent & $event, OAuth2Exception $exception) |
|
158 | 158 | { |
159 | - $event->setController(function () use ($exception) { |
|
159 | + $event->setController(function() use ($exception) { |
|
160 | 160 | $response = new Response(); |
161 | 161 | //$exception->getHttpResponse($response); |
162 | 162 | $response->getBody()->rewind(); |
@@ -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) |
@@ -64,9 +64,9 @@ discard block |
||
64 | 64 | private function getExpressionLanguage() |
65 | 65 | { |
66 | 66 | $language = new ExpressionLanguage(); |
67 | - $language->register('has', function ($str) { |
|
67 | + $language->register('has', function($str) { |
|
68 | 68 | return sprintf('(in_array(%1$s, scope))', $str); |
69 | - }, function ($arguments, $str) { |
|
69 | + }, function($arguments, $str) { |
|
70 | 70 | return in_array($str, $arguments['scope']); |
71 | 71 | }); |
72 | 72 |
@@ -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) |
@@ -125,13 +125,13 @@ discard block |
||
125 | 125 | private function getParametersToCheck(): array |
126 | 126 | { |
127 | 127 | return [ |
128 | - 'id' => function ($value, AccessToken $accessToken) { |
|
128 | + 'id' => function($value, AccessToken $accessToken) { |
|
129 | 129 | return hash_equals($accessToken->getTokenId()->getValue(), $value); |
130 | 130 | }, |
131 | - 'ts' => function ($value) { |
|
131 | + 'ts' => function($value) { |
|
132 | 132 | return time() < $this->getTimestampLifetime() + (int) $value; |
133 | 133 | }, |
134 | - 'nonce' => function () { |
|
134 | + 'nonce' => function() { |
|
135 | 135 | return true; |
136 | 136 | }, |
137 | 137 | ]; |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | * |
193 | 193 | * @return bool |
194 | 194 | */ |
195 | - private function isHeaderValid(string $header, array &$additionalCredentialValues, string &$token = null): bool |
|
195 | + private function isHeaderValid(string $header, array &$additionalCredentialValues, string & $token = null): bool |
|
196 | 196 | { |
197 | 197 | if (1 === preg_match('/(\w+)=("((?:[^"\\\\]|\\\\.)+)"|([^\s,$]+))/', $header, $matches)) { |
198 | 198 | preg_match_all('/(\w+)=("((?:[^"\\\\]|\\\\.)+)"|([^\s,$]+))/', $header, $matches, PREG_SET_ORDER); |
@@ -1,6 +1,6 @@ |
||
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) |
@@ -1,6 +1,6 @@ |
||
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) |
@@ -1,6 +1,6 @@ |
||
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) |
@@ -1,6 +1,6 @@ |
||
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) |