@@ -42,7 +42,7 @@ |
||
| 42 | 42 | $clientScopes = $client->scopes; |
| 43 | 43 | |
| 44 | 44 | $requestedScopeIds = []; |
| 45 | - foreach($scopes as $scope) { |
|
| 45 | + foreach ($scopes as $scope) { |
|
| 46 | 46 | $requestedScopeIds[] = $scope->getIdentifier(); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -134,7 +134,9 @@ |
||
| 134 | 134 | */ |
| 135 | 135 | $this->app->resolving(AuthorizationServer::class, function(AuthorizationServer $authorizationServer) { |
| 136 | 136 | foreach(config('oauth2-server.grants') as $grantConfig) { |
| 137 | - if (!(boolean) $grantConfig['enabled']) continue; |
|
| 137 | + if (!(boolean) $grantConfig['enabled']) { |
|
| 138 | + continue; |
|
| 139 | + } |
|
| 138 | 140 | |
| 139 | 141 | /** @var GrantTypeInterface $grant */ |
| 140 | 142 | $grant = app($grantConfig['class']); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | { |
| 59 | 59 | // Merge config |
| 60 | 60 | $this->mergeConfigFrom( |
| 61 | - dirname(__DIR__).'/config/oauth2-server.php', 'oauth2-server' |
|
| 61 | + dirname(__DIR__) . '/config/oauth2-server.php', 'oauth2-server' |
|
| 62 | 62 | ); |
| 63 | 63 | |
| 64 | 64 | /* |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | * Add active grants to authorization server |
| 114 | 114 | */ |
| 115 | 115 | $this->app->resolving(AuthorizationServer::class, function(AuthorizationServer $authorizationServer) { |
| 116 | - foreach(config('oauth2-server.grants') as $grantConfig) { |
|
| 116 | + foreach (config('oauth2-server.grants') as $grantConfig) { |
|
| 117 | 117 | if (!(boolean) $grantConfig['enabled']) continue; |
| 118 | 118 | |
| 119 | 119 | /** @var GrantTypeInterface $grant */ |
@@ -7,21 +7,21 @@ |
||
| 7 | 7 | |
| 8 | 8 | $router->post(config('oauth2-server.paths.access_token'), [ |
| 9 | 9 | 'as' => 'oauth2-server::access_token', |
| 10 | - 'uses' => config('oauth2-server.controller').'@accessToken' |
|
| 10 | + 'uses' => config('oauth2-server.controller') . '@accessToken' |
|
| 11 | 11 | ]); |
| 12 | 12 | |
| 13 | 13 | $router->delete(config('oauth2-server.paths.access_token'), [ |
| 14 | 14 | 'as' => 'oauth2-server::access_token', |
| 15 | - 'uses' => config('oauth2-server.controller').'@revokeAccessToken', |
|
| 15 | + 'uses' => config('oauth2-server.controller') . '@revokeAccessToken', |
|
| 16 | 16 | 'middleware' => ['oauth2-resource'] |
| 17 | 17 | ]); |
| 18 | 18 | |
| 19 | 19 | $router->get(config('oauth2-server.paths.authorize'), [ |
| 20 | 20 | 'as' => 'oauth2-server::authorize', |
| 21 | - 'uses' => config('oauth2-server.controller').'@authorize' |
|
| 21 | + 'uses' => config('oauth2-server.controller') . '@authorize' |
|
| 22 | 22 | ]); |
| 23 | 23 | |
| 24 | 24 | $router->post(config('oauth2-server.paths.authorize'), [ |
| 25 | 25 | 'as' => 'oauth2-server::authorize', |
| 26 | - 'uses' => config('oauth2-server.controller').'@completeAuthorization' |
|
| 26 | + 'uses' => config('oauth2-server.controller') . '@completeAuthorization' |
|
| 27 | 27 | ]); |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | */ |
| 69 | 69 | protected function convertToSymfonyResponse($response) |
| 70 | 70 | { |
| 71 | - if ( ! $response instanceof Response) { |
|
| 71 | + if (!$response instanceof Response) { |
|
| 72 | 72 | $response = (new HttpFoundationFactory)->createResponse($response); |
| 73 | 73 | } |
| 74 | 74 | |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | * Finalizes the authorization process and returns an access code. |
| 76 | 76 | * |
| 77 | 77 | * @param UserRepositoryInterface $users |
| 78 | - * @param ServerRequestInterface $response |
|
| 78 | + * @param ResponseInterface $response |
|
| 79 | 79 | * @return ResponseInterface |
| 80 | 80 | */ |
| 81 | 81 | public function completeAuthorization(UserRepositoryInterface $users, ServerRequestInterface $request, ResponseInterface $response) |