@@ -106,7 +106,7 @@ |
||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | return redirect()->route('wizard.profile'); |
| 109 | - }catch (ValidationException $e) { |
|
| 109 | + } catch (ValidationException $e) { |
|
| 110 | 110 | $attributes = $e->validator->attributes(); |
| 111 | 111 | $attributes['provider'] = $provider; |
| 112 | 112 | return redirect()->route('register-social-network') |
@@ -87,11 +87,11 @@ |
||
| 87 | 87 | $content = $response->getBody()->getContents(); |
| 88 | 88 | $path = 'public/characteristics/' . $uuid . '.png'; |
| 89 | 89 | Storage::put('public/characteristics/' . $uuid . '.png', $content); |
| 90 | - }catch (ClientException $e){ |
|
| 90 | + } catch (ClientException $e){ |
|
| 91 | 91 | $this->info('No icon for department : '.$number); |
| 92 | 92 | $path = ''; |
| 93 | 93 | } |
| 94 | - }else{ |
|
| 94 | + } else{ |
|
| 95 | 95 | $this->info('No icon for department : '.$number); |
| 96 | 96 | $path = ''; |
| 97 | 97 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | foreach ($properties as $key => $property){ |
| 17 | 17 | if(is_object($property)){ |
| 18 | 18 | $params[$this->camelToSnake($key)] = $this->serialize(get_object_vars($property)); |
| 19 | - }else { |
|
| 19 | + } else { |
|
| 20 | 20 | $params[$this->camelToSnake($key)] = $property; |
| 21 | 21 | } |
| 22 | 22 | } |
@@ -14,9 +14,9 @@ discard block |
||
| 14 | 14 | { |
| 15 | 15 | if($provider === 'twitter'){ |
| 16 | 16 | $user = Socialite::driver($provider)->user(); |
| 17 | - }elseif($provider === 'facebook'){ |
|
| 17 | + } elseif($provider === 'facebook'){ |
|
| 18 | 18 | $user = Socialite::driver($provider)->fields(['name', 'first_name', 'last_name', 'email'])->user(); |
| 19 | - }else { |
|
| 19 | + } else { |
|
| 20 | 20 | $user = Socialite::driver($provider)->stateless()->user(); |
| 21 | 21 | } |
| 22 | 22 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | if(!empty($user->user['given_name'])){ |
| 28 | 28 | |
| 29 | 29 | $firstname = $user->user['given_name']; |
| 30 | - }elseif (!empty($user->user['first_name'])){ |
|
| 30 | + } elseif (!empty($user->user['first_name'])){ |
|
| 31 | 31 | |
| 32 | 32 | $firstname = $user->user['first_name']; |
| 33 | 33 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | if(!empty($user->user['family_name'])){ |
| 37 | 37 | |
| 38 | 38 | $lastname = $user->user['family_name']; |
| 39 | - }elseif (!empty($user->user['last_name'])){ |
|
| 39 | + } elseif (!empty($user->user['last_name'])){ |
|
| 40 | 40 | |
| 41 | 41 | $lastname = $user->user['last_name']; |
| 42 | 42 | } |
@@ -89,8 +89,9 @@ |
||
| 89 | 89 | |
| 90 | 90 | // If the user has an email, we take it for granted that Google or Facebook has already verified it: |
| 91 | 91 | $email = $socialiteUser->email(); |
| 92 | - if (!empty($email)) |
|
| 93 | - $this->userRepository->verifyEmail($id); |
|
| 92 | + if (!empty($email)) { |
|
| 93 | + $this->userRepository->verifyEmail($id); |
|
| 94 | + } |
|
| 94 | 95 | |
| 95 | 96 | return [ |
| 96 | 97 | 'user_id' => $id, |
@@ -162,7 +162,7 @@ |
||
| 162 | 162 | { |
| 163 | 163 | try { |
| 164 | 164 | $this->forumApiClient->updateEmail($user->discourse_username, $user->email); |
| 165 | - }catch (\Throwable $e){ |
|
| 165 | + } catch (\Throwable $e){ |
|
| 166 | 166 | $this->error('User email not updated on discourse with id : '.$user->discourse_username); |
| 167 | 167 | } |
| 168 | 168 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | $user->sync_at_discourse = null; |
| 21 | 21 | $user->save(); |
| 22 | - }catch (\Throwable $e){ |
|
| 22 | + } catch (\Throwable $e){ |
|
| 23 | 23 | Log::emergency('Error when sync asking for user : '.$user->id); |
| 24 | 24 | \Sentry\captureException($e); |
| 25 | 25 | } |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | |
| 46 | 46 | try { |
| 47 | 47 | $context = $contextQueryByUser->execute(Auth::user()->uuid)->toArray(); |
| 48 | - }catch (\Throwable $e){ |
|
| 48 | + } catch (\Throwable $e){ |
|
| 49 | 49 | // profile not found, we redirect to creation of profile |
| 50 | 50 | return redirect()->route('wizard.profile'); |
| 51 | 51 | } |
@@ -46,8 +46,7 @@ |
||
| 46 | 46 | $user->wiki_token = ''; |
| 47 | 47 | $user->save(); |
| 48 | 48 | Auth::logout(); |
| 49 | - } |
|
| 50 | - else |
|
| 49 | + } else |
|
| 51 | 50 | { |
| 52 | 51 | $request = request(); |
| 53 | 52 | $locale = \App\LocalesConfig::getLocaleFromCode($request->getPreferredLanguage()); |