Add spacing around logical blocks

This commit is contained in:
Andrew Millington 2018-04-20 18:27:47 +01:00
parent c8b44ff5c7
commit 9febc32e14
No known key found for this signature in database
GPG Key ID: 815DE090877B53F3

View File

@ -222,6 +222,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
$request, $request,
$this->getServerParameter('PHP_AUTH_USER', $request) $this->getServerParameter('PHP_AUTH_USER', $request)
); );
if (is_null($clientId)) { if (is_null($clientId)) {
throw OAuthServerException::invalidRequest('client_id'); throw OAuthServerException::invalidRequest('client_id');
} }
@ -239,6 +240,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
} }
$redirectUri = $this->getQueryStringParameter('redirect_uri', $request); $redirectUri = $this->getQueryStringParameter('redirect_uri', $request);
if ($redirectUri !== null) { if ($redirectUri !== null) {
if ( if (
is_string($client->getRedirectUri()) is_string($client->getRedirectUri())
@ -284,6 +286,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
} }
$codeChallengeMethod = $this->getQueryStringParameter('code_challenge_method', $request, 'plain'); $codeChallengeMethod = $this->getQueryStringParameter('code_challenge_method', $request, 'plain');
if (in_array($codeChallengeMethod, ['plain', 'S256'], true) === false) { if (in_array($codeChallengeMethod, ['plain', 'S256'], true) === false) {
throw OAuthServerException::invalidRequest( throw OAuthServerException::invalidRequest(
'code_challenge_method', 'code_challenge_method',