| @@ -53,7 +53,7 @@ discard block | ||
| 53 | 53 | */ | 
| 54 | 54 | public function supports(Request $request): bool | 
| 55 | 55 |      { | 
| 56 | -        if(!$this->security->getUser() || ($request->query->get('code') && $request->get('state'))) { | |
| 56 | +        if (!$this->security->getUser() || ($request->query->get('code') && $request->get('state'))) { | |
| 57 | 57 | return true; | 
| 58 | 58 | } | 
| 59 | 59 | |
| @@ -82,14 +82,14 @@ discard block | ||
| 82 | 82 | $oauthEmail = $oauthUser->getEmail(); | 
| 83 | 83 | $oauthId = $oauthUser->getId(); | 
| 84 | 84 | |
| 85 | -        if(!$oauthUser) { | |
| 85 | +        if (!$oauthUser) { | |
| 86 | 86 | return null; | 
| 87 | 87 | } | 
| 88 | 88 | |
| 89 | 89 | // Is there an existing user with the same oauth id? | 
| 90 | 90 | $user = $userProvider->findOneByExternalId($oauthId); | 
| 91 | -        if($user) { | |
| 92 | -            if($user->getEmail() !== $oauthEmail) { | |
| 91 | +        if ($user) { | |
| 92 | +            if ($user->getEmail() !== $oauthEmail) { | |
| 93 | 93 | // If the email has changed for the user, update it here as well | 
| 94 | 94 | $user->setEmail($oauthEmail); | 
| 95 | 95 | $user->setUsername($oauthEmail); | 
| @@ -101,7 +101,7 @@ discard block | ||
| 101 | 101 | |
| 102 | 102 | // Is there an existing user with the same email address? | 
| 103 | 103 | $user = $userProvider->findOneByEmail($oauthEmail); | 
| 104 | -        if($user) { | |
| 104 | +        if ($user) { | |
| 105 | 105 | return $user; | 
| 106 | 106 | } | 
| 107 | 107 | |
| @@ -23,7 +23,7 @@ discard block | ||
| 23 | 23 | |
| 24 | 24 | public function getAccessToken($grant, array $options = []): AccessToken | 
| 25 | 25 |      { | 
| 26 | -        if(!isset($this->access_token)) { | |
| 26 | +        if (!isset($this->access_token)) { | |
| 27 | 27 | $this->access_token = parent::getAccessToken($grant, $options); | 
| 28 | 28 | } | 
| 29 | 29 | return $this->access_token; | 
| @@ -31,17 +31,17 @@ discard block | ||
| 31 | 31 | |
| 32 | 32 | public function getBaseAuthorizationUrl(): string | 
| 33 | 33 |      { | 
| 34 | - return $this->base_url . '/authorize'; | |
| 34 | + return $this->base_url.'/authorize'; | |
| 35 | 35 | } | 
| 36 | 36 | |
| 37 | 37 | public function getBaseAccessTokenUrl(array $params): string | 
| 38 | 38 |      { | 
| 39 | - return $this->base_url . '/oauth/token'; | |
| 39 | + return $this->base_url.'/oauth/token'; | |
| 40 | 40 | } | 
| 41 | 41 | |
| 42 | 42 | public function getResourceOwnerDetailsUrl(AccessToken $token): string | 
| 43 | 43 |      { | 
| 44 | - return $this->base_url . '/userinfo'; | |
| 44 | + return $this->base_url.'/userinfo'; | |
| 45 | 45 | } | 
| 46 | 46 | |
| 47 | 47 | protected function getDefaultScopes(): string | 
| @@ -51,7 +51,7 @@ discard block | ||
| 51 | 51 | |
| 52 | 52 | protected function checkResponse(ResponseInterface $response, $data): void | 
| 53 | 53 |      { | 
| 54 | -        if($response->getStatusCode() >= 400) { | |
| 54 | +        if ($response->getStatusCode() >= 400) { | |
| 55 | 55 | throw new IdentityProviderException( | 
| 56 | 56 | $response->getReasonPhrase(), | 
| 57 | 57 | $response->getStatusCode(), | 
| @@ -71,9 +71,9 @@ discard block | ||
| 71 | 71 | |
| 72 | 72 | protected function getAuthorizationHeaders($token = null): array | 
| 73 | 73 |      { | 
| 74 | -        if($token) { | |
| 74 | +        if ($token) { | |
| 75 | 75 | return [ | 
| 76 | - 'Authorization' => 'Bearer ' . $token | |
| 76 | + 'Authorization' => 'Bearer '.$token | |
| 77 | 77 | ]; | 
| 78 | 78 | } | 
| 79 | 79 | |
| @@ -36,8 +36,8 @@ | ||
| 36 | 36 | public function connectCheckAction(Request $request): Response | 
| 37 | 37 |      { | 
| 38 | 38 | // If we didn't log in, something went wrong. Throw an exception! | 
| 39 | -        if(!$this->getUser()) { | |
| 40 | -            $response =  $this->render('bundles/TwigBundle/Exception/error403.html.twig'); | |
| 39 | +        if (!$this->getUser()) { | |
| 40 | +            $response = $this->render('bundles/TwigBundle/Exception/error403.html.twig'); | |
| 41 | 41 | $response->setStatusCode(403); | 
| 42 | 42 | return $response; | 
| 43 | 43 | } |