@@ -39,23 +39,23 @@ |
||
| 39 | 39 | $organizationToJoin = $this->organizationRepository->get($organizationId); |
| 40 | 40 | |
| 41 | 41 | $currentUser = $this->authGateway->current(); |
| 42 | - if(isset($currentUser) && $currentUser->email() !== $email){ |
|
| 42 | + if (isset($currentUser) && $currentUser->email() !== $email) { |
|
| 43 | 43 | $action = 'logout'; |
| 44 | 44 | $action .= !isset($user) ? '-register' : '-login'; |
| 45 | 45 | |
| 46 | - if($action == 'logout-login') { |
|
| 46 | + if ($action == 'logout-login') { |
|
| 47 | 47 | return $this->badUserLoginToAcceptAction($action, $organizationToJoin); |
| 48 | 48 | } |
| 49 | 49 | return $this->returnLogoutAction($action, $organizationToJoin, $email, $firstname, $lastname); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | |
| 53 | - if(!isset($user)){ |
|
| 53 | + if (!isset($user)) { |
|
| 54 | 54 | return $this->returnRegisterAction($organizationId, $email, $firstname, $lastname); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | $currentUser = $this->authGateway->current(); |
| 58 | - if(!isset($currentUser)){ |
|
| 58 | + if (!isset($currentUser)) { |
|
| 59 | 59 | return $this->returnLoginAction($organizationToJoin); |
| 60 | 60 | } |
| 61 | 61 | |
@@ -35,27 +35,27 @@ |
||
| 35 | 35 | { |
| 36 | 36 | $this->registerHelpers(); |
| 37 | 37 | |
| 38 | - if(config('app.env') === 'testing'){ |
|
| 38 | + if (config('app.env') === 'testing') { |
|
| 39 | 39 | $this->tuBinding(); |
| 40 | 40 | } |
| 41 | - if(config('app.env') === 'testing-ti'){ |
|
| 41 | + if (config('app.env') === 'testing-ti') { |
|
| 42 | 42 | $this->tiBinding(); |
| 43 | 43 | } |
| 44 | - if(config('app.env') === 'local' || config('app.env') === 'production'){ |
|
| 44 | + if (config('app.env') === 'local' || config('app.env') === 'production') { |
|
| 45 | 45 | $this->prodBinding(); |
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | public function boot() |
| 50 | 50 | { |
| 51 | - if(config('app.env') !== 'testing' && config('app.env') !== 'testing-ti') { |
|
| 51 | + if (config('app.env') !== 'testing' && config('app.env') !== 'testing-ti') { |
|
| 52 | 52 | Schema::defaultStringLength(191); |
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | private function registerHelpers(): void |
| 57 | 57 | { |
| 58 | - foreach (glob(app_path() . '/Src/Utils/Helpers/*.php') as $filename) { |
|
| 58 | + foreach (glob(app_path().'/Src/Utils/Helpers/*.php') as $filename) { |
|
| 59 | 59 | require_once($filename); |
| 60 | 60 | } |
| 61 | 61 | } |