Passed
Push — master ( af59f2...c344e1 )
by Alexandre
02:20
created
src/OAuth2/Extensions/OpenID/Endpoints/AuthorizationEndpoint.php 2 patches
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.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,8 +121,7 @@
 block discarded – undo
121 121
              * specified in the Authorization Request using the application/x-www-form-urlencoded format,
122 122
              * unless a different Response Mode was specified.
123 123
              */
124
-        }
125
-        catch (OAuthException $e) {
124
+        } catch (OAuthException $e) {
126 125
             /**
127 126
              * If the Authorization Server encounters any error, it MUST return an error response, per Section 3.1.2.6.
128 127
              */
Please login to merge, or discard this patch.
src/OAuth2/Extensions/PKCE/Credentials/AuthorizationCode.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
                                 int $expiresAt, ?string $requestedScope = null, ?string $redirectUri = null,
25 25
                                 ?string $codeChallenge = null, ?string $codeChallengeMethod = null)
26 26
     {
27
-       parent::__construct($code, $scope, $clientIdentifier, $resourceOwnerIdentifier, $expiresAt, $requestedScope, $redirectUri);
27
+        parent::__construct($code, $scope, $clientIdentifier, $resourceOwnerIdentifier, $expiresAt, $requestedScope, $redirectUri);
28 28
         $this->codeChallenge = $codeChallenge;
29 29
         $this->codeChallengeMethod = $codeChallengeMethod;
30 30
     }
Please login to merge, or discard this patch.
src/OAuth2/ScopePolicy/ScopePolicyManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
             $supportedScopes = explode(' ', $client->getMetadata()->getScope());
60 60
             if (!empty(array_diff($scopes, $supportedScopes))) {
61 61
                 throw new OAuthException('invalid_scope',
62
-                    'The request scope is invalid. Supported scopes : ' . $client->getMetadata()->getScope(),
62
+                    'The request scope is invalid. Supported scopes : '.$client->getMetadata()->getScope(),
63 63
                     'https://tools.ietf.org/html/rfc6749#section-4.1');
64 64
             }
65 65
         }
Please login to merge, or discard this patch.
src/OAuth2/Endpoints/AuthorizationEndpoint.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@
 block discarded – undo
230 230
 
231 231
             $this->redirectUri = $redirectUri;
232 232
         } catch (\InvalidArgumentException $e) {
233
-            throw new OAuthException('invalid_request', 'The request includes the malformed parameter redirect_uri. ' . $e->getMessage(),
233
+            throw new OAuthException('invalid_request', 'The request includes the malformed parameter redirect_uri. '.$e->getMessage(),
234 234
                 'https://tools.ietf.org/html/rfc6749#section-4.1');
235 235
         }
236 236
     }
Please login to merge, or discard this patch.
src/OAuth2/Extensions/OpenID/IdToken.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
     function getClaims() : array
27 27
     {
28
-       return $this->claims;
28
+        return $this->claims;
29 29
     }
30 30
 
31 31
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@
 block discarded – undo
30 30
     {
31 31
         $missingClaims = array_diff(self::REQUIRED_CLAIMS, array_keys($claims));
32 32
         if (!empty($missingClaims)) {
33
-            throw new \Exception('Missing claims : ' . implode(', ', $missingClaims));
33
+            throw new \Exception('Missing claims : '.implode(', ', $missingClaims));
34 34
         }
35 35
 
36 36
         $undefinedClaims = array_diff(array_keys($claims), self::DEFINED_CLAIMS);
37 37
         if (!empty($undefinedClaims)) {
38
-            throw new \Exception('Undefined claims : ' . implode(', ', $undefinedClaims));
38
+            throw new \Exception('Undefined claims : '.implode(', ', $undefinedClaims));
39 39
         }
40 40
 
41 41
         // todo check nonce required if present in authentication request
Please login to merge, or discard this patch.
src/OAuth2/Extensions/OpenID/Models/AddressClaim.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -142,22 +142,22 @@
 block discarded – undo
142 142
     function jsonSerialize()
143 143
     {
144 144
         $data = [];
145
-        if($this->formatted) {
145
+        if ($this->formatted) {
146 146
             $data['formatted'] = $this->formatted;
147 147
         }
148
-        if($this->streetAddress) {
148
+        if ($this->streetAddress) {
149 149
             $data['street_address'] = $this->streetAddress;
150 150
         }
151
-        if($this->locality) {
151
+        if ($this->locality) {
152 152
             $data['locality'] = $this->locality;
153 153
         }
154
-        if($this->region) {
154
+        if ($this->region) {
155 155
             $data['region'] = $this->region;
156 156
         }
157
-        if($this->postalCode) {
157
+        if ($this->postalCode) {
158 158
             $data['postal_code'] = $this->postalCode;
159 159
         }
160
-        if($this->country) {
160
+        if ($this->country) {
161 161
             $data['country'] = $this->country;
162 162
         }
163 163
         return empty($data) ? '' : json_encode($data);
Please login to merge, or discard this patch.
src/OAuth2/Extensions/OpenID/Models/StandardClaims.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -445,7 +445,7 @@
 block discarded – undo
445 445
     {
446 446
         $getter = 'get'.ucfirst($this->snakeToCamel($offset));
447 447
         $result = $this->{$getter}();
448
-        if(is_object($result)) {
448
+        if (is_object($result)) {
449 449
             return json_encode($result);
450 450
         }
451 451
         return $result;
Please login to merge, or discard this patch.