Passed
Push — master ( 411f65...7cec5a )
by Alexandre
02:03
created
src/Old/Endpoint/Server/Authorization.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -238,8 +238,7 @@
 block discarded – undo
238 238
 
239 239
         if($isImplicitResponseType) {
240 240
             $redirectUri = $redirectUri->withFragment(http_build_query($params));
241
-        }
242
-        else {
241
+        } else {
243 242
             foreach ($params as $key => $value) {
244 243
                 $redirectUri = Uri::withQueryValue($redirectUri, $key, $value);
245 244
             }
Please login to merge, or discard this patch.
src/Old/Endpoint/Server/Token.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -166,8 +166,7 @@
 block discarded – undo
166 166
 
167 167
         try {
168 168
             $redirectUri = $grantType->grant($request, $client);
169
-        }
170
-        catch(InvalidGrantType $e) {
169
+        } catch(InvalidGrantType $e) {
171 170
             return new ErrorResponse('invalid_grant', $e->getErrorDescription(), $e->getErrorUri());
172 171
         }
173 172
 
Please login to merge, or discard this patch.
src/OAuth2/OpenID/Endpoints/AuthorizationEndpoint.php 1 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/OAuth2OLD/Endpoints/TokenEndpoint.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,7 @@
 block discarded – undo
96 96
 
97 97
         try {
98 98
             return $grantType->grant($request, $client);
99
-        }
100
-        catch (OAuthException $e) {
99
+        } catch (OAuthException $e) {
101 100
             return new ErrorResponse($e->getError(),
102 101
                 $e->getErrorDescription(),
103 102
                 $e->getErrorUri());
Please login to merge, or discard this patch.
src/OAuth2OLD/OpenID/ResponseTypes/IdTokenResponseType.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,8 +111,7 @@
 block discarded – undo
111 111
             $token = $responseType->handle($request, $resourceOwner, $client, $scope)['token'];
112 112
             $result['token'] = $token;
113 113
             $claims['at_hash'] = 'todo'; //todo
114
-        }
115
-        else {
114
+        } else {
116 115
             $requestedScopes = isset($data['scope']) ? explode(' ', $data['scope']) : [];
117 116
 
118 117
             if ((empty($requestedScopes) && !is_null($scope)) || (is_array($scope) && !empty(array_diff($requestedScopes, $scope)))) {
Please login to merge, or discard this patch.
src/OAuth2OLD/GrantTypes/ResourceOwnerPasswordCredentialsGrantType.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,8 +85,7 @@
 block discarded – undo
85 85
 
86 86
         try {
87 87
             $resourceOwner = $this->resourceOwnerProvider->authenticate($username, $password);
88
-        }
89
-        catch (\Exception $e) {
88
+        } catch (\Exception $e) {
90 89
             throw new OAuthException('invalid_grant', $e->getMessage(),
91 90
                 'https://tools.ietf.org/html/rfc6749#section-4.3');
92 91
         }
Please login to merge, or discard this patch.
src/OAuth2/Endpoints/AuthorizationEndpoint.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -207,12 +207,10 @@  discard block
 block discarded – undo
207 207
                 throw new OAuthException('invalid_request', 'The request includes the invalid parameter redirect_uri.',
208 208
                     'https://tools.ietf.org/html/rfc6749#section-4.1');
209 209
             }
210
-        }
211
-        else {
210
+        } else {
212 211
             if (count($redirectUris) == 1) {
213 212
                $redirectUri = $redirectUris[0];
214
-            }
215
-            else {
213
+            } else {
216 214
                 throw new OAuthException('invalid_request', 'The request is missing the required parameter redirect_uri.',
217 215
                     'https://tools.ietf.org/html/rfc6749#section-4.1');
218 216
             }
@@ -223,8 +221,7 @@  discard block
 block discarded – undo
223 221
                 throw new \InvalidArgumentException('The endpoint URI must not include a fragment component.');
224 222
             }
225 223
             $this->redirectUri = $redirectUri;
226
-        }
227
-        catch (\InvalidArgumentException $e) {
224
+        } catch (\InvalidArgumentException $e) {
228 225
             throw new OAuthException('invalid_request', 'The request includes the malformed parameter redirect_uri. '.$e->getMessage(),
229 226
                 'https://tools.ietf.org/html/rfc6749#section-4.1');
230 227
         }
Please login to merge, or discard this patch.