Completed
Push — master ( fc6f01...c001b0 )
by Alexandre
01:58
created
src/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.
src/ScopePolicy/Policies/IgnoreScopePolicy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
     public function __construct(array $scopes)
30 30
     {
31
-        if(empty($scopes)) {
31
+        if (empty($scopes)) {
32 32
             throw new \InvalidArgumentException('Scope must not be an empty array');
33 33
         }
34 34
         $this->scopes = $scopes;
Please login to merge, or discard this patch.
src/ScopePolicy/ScopePolicyManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         if (!empty($supportedScopes)) {
102 102
             if (!empty(array_diff($scopes, $supportedScopes))) {
103 103
                 throw new OAuthException('invalid_scope',
104
-                    'The request scope is invalid. Supported scopes : ' . implode(', ', $supportedScopes),
104
+                    'The request scope is invalid. Supported scopes : '.implode(', ', $supportedScopes),
105 105
                     'https://tools.ietf.org/html/rfc6749#section-4.1');
106 106
             }
107 107
         }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         if ($client instanceof RegisteredClient && !empty($supportedScopes)) {
128 128
             if (!empty(array_diff($scopes, $supportedScopes))) {
129 129
                 throw new OAuthException('invalid_scope',
130
-                    'The request scope is invalid. Supported scopes : ' . implode(', ', $supportedScopes),
130
+                    'The request scope is invalid. Supported scopes : '.implode(', ', $supportedScopes),
131 131
                     'https://tools.ietf.org/html/rfc6749#section-4.1');
132 132
             }
133 133
         }
Please login to merge, or discard this patch.
src/ScopePolicy/Policies/DefaultScopePolicy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
     public function __construct(array $scopes)
30 30
     {
31
-        if(empty($scopes)) {
31
+        if (empty($scopes)) {
32 32
             throw new \InvalidArgumentException('Scope must not be an empty array');
33 33
         }
34 34
         $this->scopes = $scopes;
Please login to merge, or discard this patch.
src/Extensions/OpenID/IdTokenManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function decode(string $idToken): IdTokenInterface
38 38
     {
39 39
         $claims = $this->jwt->decode($idToken, self::KEY, 'HS256');
40
-        $idToken = new IdToken((array)$claims);
40
+        $idToken = new IdToken((array) $claims);
41 41
         return $idToken;
42 42
     }
43 43
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             $alg = $metadata->getIdTokenSignedResponseAlg() ?: 'RS256';
61 61
         }
62 62
 
63
-        $keys=[];
63
+        $keys = [];
64 64
         $jwks = $metadata->getJwks();
65 65
 
66 66
         if (!empty($jwks)) {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             throw new \UnexpectedValueException('Client metadata Id token signed response alg value is unexpected. 
136 136
             It must end with "256", "384" or "513"');
137 137
         }
138
-        $macAlgorithm = 'sha' . $macAlgorithm;
138
+        $macAlgorithm = 'sha'.$macAlgorithm;
139 139
 
140 140
         $hash = hash($macAlgorithm, $target, true);
141 141
         $hash = substr($hash, 0, strlen($hash) / 2);
Please login to merge, or discard this patch.
src/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
 public 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/Extensions/OpenID/AuthorizationGrantTypes/Flows/ImplicitFlow.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
         if (!in_array($macAlgorithm, [256, 384, 512])) {
127 127
             throw new \UnexpectedValueException("Algotihmn '".$macAlgorithm."' not supported");
128 128
         }
129
-        $macAlgorithm = 'sha' . $macAlgorithm;
129
+        $macAlgorithm = 'sha'.$macAlgorithm;
130 130
 
131 131
 
132 132
         $atHash = hash($macAlgorithm, $accessToken['access_token'], true);
Please login to merge, or discard this patch.
src/Extensions/OpenID/Endpoints/AuthorizationEndpoint.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
             try {
156 156
                 $this->idTokenHint = $this->idTokenManager->decode($requestData['id_token_hint']);
157 157
             } catch (\Exception $exception) {
158
-                throw new OAuthException('invalid_request', 'Failed to decode id_token_hint : ' . $exception->getMessage());
158
+                throw new OAuthException('invalid_request', 'Failed to decode id_token_hint : '.$exception->getMessage());
159 159
             }
160 160
         }
161 161
 
Please login to merge, or discard this patch.
src/Roles/ResourceServer/ResourceServer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
              * WWW-Authenticate: Bearer realm="example"
106 106
              */
107 107
             if (!$bearerAuthenticationMethodUsed) {
108
-                return new Response(401, ['WWW-Authenticate' => 'Bearer' . ($realm ? ' realm="example"' : '')]);
108
+                return new Response(401, ['WWW-Authenticate' => 'Bearer'.($realm ? ' realm="example"' : '')]);
109 109
             }
110 110
 
111 111
             $token = $bearerAuthenticationMethodUsed->authenticate($request);
@@ -205,14 +205,14 @@  discard block
 block discarded – undo
205 205
 
206 206
             $header = 'Bearer';
207 207
             if ($realm) {
208
-                $header .= ' realm="' . $realm . '"';
208
+                $header .= ' realm="'.$realm.'"';
209 209
             }
210
-            $header .= ' error="' . $e->getError() . '"';
210
+            $header .= ' error="'.$e->getError().'"';
211 211
             if ($e->getErrorDescription()) {
212
-                $header .= ' error_description="' . $e->getErrorDescription() . '"';
212
+                $header .= ' error_description="'.$e->getErrorDescription().'"';
213 213
             }
214 214
             if ($e->getErrorUri()) {
215
-                $header .= ' error_uri="' . $e->getErrorUri() . '"';
215
+                $header .= ' error_uri="'.$e->getErrorUri().'"';
216 216
             }
217 217
 
218 218
             return new Response($statusCode, ['WWW-Authenticate' => $header]);
Please login to merge, or discard this patch.