Passed
Push — master ( eb6d38...49440b )
by Bertrand
08:06
created
app/Src/UseCases/Domain/Organizations/GrantUserAsAdminOrganization.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     public function grant(string $userId, string $organizationId)
20 20
     {
21 21
         $user = $this->userRepository->getById($userId);
22
-        if(!$user->belongsTo($organizationId)){
22
+        if (!$user->belongsTo($organizationId)) {
23 23
             throw new UserGrantAdminException();
24 24
         }
25 25
 
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/System/SetInteractionToRegisteredUser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
         $this->authGateway = $authGateway;
24 24
     }
25 25
 
26
-    public function execute():?string
26
+    public function execute(): ?string
27 27
     {
28 28
         $currentUser = $this->authGateway->current();
29
-        if(!isset($currentUser)){
29
+        if (!isset($currentUser)) {
30 30
             return 'nothing_to_do';
31 31
         }
32 32
         $anonymousUser = new AnonymousUser($this->authGateway->wikiSessionId());
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Users/Interactions/HandleInteractions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 
49 49
         $canInteractUser = $this->getInteractUser();
50 50
         $interaction = $this->interactionRepository->getByInteractUser($canInteractUser, $pageId);
51
-        if(!isset($interaction)) {
51
+        if (!isset($interaction)) {
52 52
             $canInteractUser->addInteraction($interactions, $pageId, $doneValue);
53 53
             return;
54 54
         }
Please login to merge, or discard this patch.
app/Http/Middleware/SetWikiSessionId.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Shared/Gateway/AuthGateway.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/System/SetPageDryState.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     public function execute(int $pageId)
20 20
     {
21 21
         $page = $this->pageRepository->get($pageId);
22
-        if($page === null){
22
+        if ($page === null) {
23 23
             $page = new Page($pageId, true);
24 24
             $this->pageRepository->save($page);
25 25
             return;
Please login to merge, or discard this patch.
app/Src/UseCases/Infra/Gateway/SessionAuthGateway.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
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
         $roles = $userModel->roles()->pluck('name')->toArray();
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         Auth::login($authenticate, true);
28 28
     }
29 29
 
30
-    public function wikiSessionId():? string
30
+    public function wikiSessionId(): ? string
31 31
     {
32 32
         return Session::get('wiki_session_id');
33 33
     }
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Ports/InteractionRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 interface InteractionRepository
11 11
 {
12 12
     public function save(CanInteract $canInteract, Interaction $interaction);
13
-    public function getByInteractUser(CanInteract $canInteract, int $pageId):?Interaction;
13
+    public function getByInteractUser(CanInteract $canInteract, int $pageId): ?Interaction;
14 14
     public function transfer(CanInteract $anonymous, CanInteract $registered);
15 15
     public function getCountInteractionsOnPage(int $pageId):array;
16 16
     public function getInteractionsByUser(string $userId):array;
Please login to merge, or discard this patch.
app/Console/Commands/ImportAllPagesFromWiki.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         $this->handlePages($pages);
36 36
         $continue = $content['continue']['gapcontinue'] ?? null;
37 37
 
38
-        while($continue !== null && $continue !== ''){
38
+        while ($continue !== null && $continue !== '') {
39 39
             $this->info($continue);
40 40
 
41 41
             $pagesApiUri = config('wiki.api_uri').$queryPages.'&gapcontinue='.$continue;
Please login to merge, or discard this patch.