@@ -51,7 +51,7 @@ |
||
51 | 51 | { |
52 | 52 | if ($client instanceof RegisteredClient && is_array($client->getMetadata()->getScope())) { |
53 | 53 | $supportedScopes = explode(' ', $client->getMetadata()->getScope()); |
54 | - if(empty($scopes) || !empty(array_diff($scopes, $supportedScopes))) { |
|
54 | + if (empty($scopes) || !empty(array_diff($scopes, $supportedScopes))) { |
|
55 | 55 | throw new OAuthException('invalid_scope', |
56 | 56 | 'The request scope is invalid. Supported scopes : '.$client->getMetadata()->getScope(), |
57 | 57 | 'https://tools.ietf.org/html/rfc6749#section-4.1'); |
@@ -124,14 +124,14 @@ discard block |
||
124 | 124 | * If the Authorization Server encounters any error, it MUST return an error response, per Section 3.1.2.6. |
125 | 125 | */ |
126 | 126 | $uri = $this->getRedirectUri(); |
127 | - if(!empty($this->state)) { |
|
127 | + if (!empty($this->state)) { |
|
128 | 128 | $uri = Uri::withQueryValue($uri, 'state', $this->state); |
129 | 129 | } |
130 | 130 | $uri = Uri::withQueryValue($uri, 'error', $e->getError()); |
131 | - if($e->getErrorDescription()) { |
|
131 | + if ($e->getErrorDescription()) { |
|
132 | 132 | $uri = Uri::withQueryValue($uri, 'error_description', $e->getErrorDescription()); |
133 | 133 | } |
134 | - if($e->getErrorUri()) { |
|
134 | + if ($e->getErrorUri()) { |
|
135 | 135 | $uri = Uri::withQueryValue($uri, 'error_uri', $e->getErrorUri()); |
136 | 136 | } |
137 | 137 | return new Response(302, ['Location' => $uri]); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | |
174 | 174 | $supportedResponseTypes = $this->client->getMetadata()->getResponseTypes() ?: ['code']; |
175 | 175 | foreach (explode(' ', $requestData['response_type']) as $responseType) { |
176 | - if(!in_array($responseType, $supportedResponseTypes)) { |
|
176 | + if (!in_array($responseType, $supportedResponseTypes)) { |
|
177 | 177 | throw new OAuthException('unsupported_response_type', |
178 | 178 | 'The authorization server does not support obtaining an authorization code using this method.', |
179 | 179 | 'https://tools.ietf.org/html/rfc6749#section-4.1'); |