@@ -11,7 +11,7 @@ |
||
| 11 | 11 | { |
| 12 | 12 | public function handle($request, Closure $next) |
| 13 | 13 | { |
| 14 | - if($request->input('wiki_session_id')){ |
|
| 14 | + if ($request->input('wiki_session_id')) { |
|
| 15 | 15 | Session::put('wiki_session_id', $request->input('wiki_session_id')); |
| 16 | 16 | } |
| 17 | 17 | return $next($request); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | ->where('page_id', $interaction->pageId()) |
| 22 | 22 | ->first(); |
| 23 | 23 | |
| 24 | - if($interactionModel === null) { |
|
| 24 | + if ($interactionModel === null) { |
|
| 25 | 25 | $interactionModel = new InteractionModel(); |
| 26 | 26 | $interactionModel->{$canInteract->key()} = isset($user->id) ? $user->id : $canInteract->identifier(); |
| 27 | 27 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | public function getByInteractUser(CanInteract $canInteract, int $pageId): ?Interaction |
| 35 | 35 | { |
| 36 | - if($canInteract->key() == 'user_id') { |
|
| 36 | + if ($canInteract->key() == 'user_id') { |
|
| 37 | 37 | $user = User::query()->where('uuid', $canInteract->identifier())->first(); |
| 38 | 38 | } |
| 39 | 39 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | ->where('page_id', $pageId) |
| 43 | 43 | ->first(); |
| 44 | 44 | |
| 45 | - if(!isset($interactionModel)){ |
|
| 45 | + if (!isset($interactionModel)) { |
|
| 46 | 46 | return null; |
| 47 | 47 | } |
| 48 | 48 | |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | public function current(): ?User |
| 15 | 15 | { |
| 16 | 16 | $userModel = Auth::user(); |
| 17 | - if(!isset($userModel)){ |
|
| 17 | + if (!isset($userModel)) { |
|
| 18 | 18 | return null; |
| 19 | 19 | } |
| 20 | 20 | return new User($userModel->uuid, $userModel->email, $userModel->firstname, $userModel->lastname, $userModel->organization_id); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | Auth::login($autenticable); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - public function wikiSessionId():? string |
|
| 29 | + public function wikiSessionId(): ? string |
|
| 30 | 30 | { |
| 31 | 31 | return Session::get('wiki_session_id'); |
| 32 | 32 | } |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | |
| 9 | 9 | interface AuthGateway |
| 10 | 10 | { |
| 11 | - public function current():? User; |
|
| 11 | + public function current(): ? User; |
|
| 12 | 12 | public function log(User $u); |
| 13 | - public function wikiSessionId():?string; |
|
| 13 | + public function wikiSessionId(): ?string; |
|
| 14 | 14 | } |