Passed
Push — master ( 07a608...5cc957 )
by Alexandre
02:41
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/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/OAuth2/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/ResponseTypes/CodeResponseType.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
      * @throws OAuthException
45 45
      */
46 46
     public function handle(ServerRequestInterface $request, ResourceOwnerInterface $resourceOwner,
47
-                           RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array
47
+                            RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array
48 48
     {
49 49
         if (is_array($client->getSupportedGrantTypes()) && !in_array('authorization_code', $client->getSupportedGrantTypes())) {
50 50
             throw new OAuthException('unauthorized_client',
Please login to merge, or discard this patch.
src/OAuth2/ResponseTypes/ResponseTypeInterface.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      * @return array
29 29
      */
30 30
     public function handle(ServerRequestInterface $request, ResourceOwnerInterface $resourceOwner,
31
-                           RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array;
31
+                            RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array;
32 32
 
33 33
     public function getDefaultResponseMode(): string;
34 34
     public function isQueryResponseModeSupported(): bool;
Please login to merge, or discard this patch.
src/OAuth2/OpenID/Endpoints/AuthorizationEndpoint.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 
108 108
         // todo, repository for response mode
109 109
         // https://developer.okta.com/docs/api/resources/oidc#parameter-details
110
-       /*
110
+        /*
111 111
         if (isset($data['response_mode']) && $data['response_mode'] == 'post_message') {
112 112
             return $this->popupResponse(['access_token' => 'a'], $redirectUri);
113 113
         } else {
Please login to merge, or discard this patch.
src/OAuth2/OpenID/ResponseTypes/NoneResponseType.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      * @return array
31 31
      */
32 32
     public function handle(ServerRequestInterface $request, ResourceOwnerInterface $resourceOwner,
33
-                           RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array
33
+                            RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array
34 34
     {
35 35
         return [];
36 36
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
     public function getExtendedResponseTypes(): ?array
65 65
     {
66
-       return null;
66
+        return null;
67 67
     }
68 68
 
69 69
     public function isQueryResponseModeSupported(): bool
Please login to merge, or discard this patch.
src/OAuth2/OpenID/ResponseTypes/IdTokenResponseType.php 2 patches
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.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      * @throws \Exception
61 61
      */
62 62
     public function handle(ServerRequestInterface $request, ResourceOwnerInterface $resourceOwner,
63
-                           RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array
63
+                            RegisteredClient $client, ?array $scope = null, ?array $extendedResponseTypes = null): array
64 64
     {
65 65
         $data = $request->getMethod() === 'GET' ? $request->getQueryParams() : $request->getParsedBody();
66 66
 
Please login to merge, or discard this patch.