Passed
Push — master ( fd01cd...a8d522 )
by Alexandre
02:26
created
src/OAuth2/ScopePolicy/ScopePolicyManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function verifyScopes(ClientInterface $client, array $scopes): void
51 51
     {
52
-        if(empty($scopes)) {
52
+        if (empty($scopes)) {
53 53
             throw new OAuthException('invalid_scope',
54 54
                 'The request scope is unknown.',
55 55
                 'https://tools.ietf.org/html/rfc6749#section-4.1');
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
         if ($client instanceof RegisteredClient && is_array($client->getMetadata()->getScope())) {
59 59
             $supportedScopes = explode(' ', $client->getMetadata()->getScope());
60
-            if(!empty(array_diff($scopes, $supportedScopes))) {
60
+            if (!empty(array_diff($scopes, $supportedScopes))) {
61 61
                 throw new OAuthException('invalid_scope',
62 62
                     'The request scope is invalid. Supported scopes : '.$client->getMetadata()->getScope(),
63 63
                     'https://tools.ietf.org/html/rfc6749#section-4.1');
Please login to merge, or discard this patch.
src/OAuth2/Extensions/OpenID/Endpoints/AuthorizationEndpoint.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
              */
48 48
             $scope = $requestData['scope'] ?? '';
49 49
             $scopes = explode(' ', $scope);
50
-            if(!in_array('openid', $scopes)) {
50
+            if (!in_array('openid', $scopes)) {
51 51
                 return parent::handleRequest($request);
52 52
             }
53 53
 
Please login to merge, or discard this patch.
src/OAuth2/Extensions/PKCE/Flows/AuthorizationCodeFlow.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
             }
58 58
         } else {
59 59
             $codeChallengeMethod = empty($requestData['code_challenge_method']) ? 'plain' : $requestData['code_challenge_method'];
60
-            if(!in_array($codeChallengeMethod, ['plain', 'S256'])) {
60
+            if (!in_array($codeChallengeMethod, ['plain', 'S256'])) {
61 61
                 throw new OAuthException('invalid_request',
62 62
                     'The request includes the invalid parameter code_challenge_method. Supported : plain, S256',
63 63
                     'https://tools.ietf.org/html/rfc7636#section-4');
Please login to merge, or discard this patch.