Passed
Push — master ( 2b0762...9c76a8 )
by Bertrand
26:13 queued 17:43
created
Src/UseCases/Domain/Organizations/Invitation/InviteUsersInOrganization.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     {
30 30
         $invitations = [];
31 31
         $organization = $this->organizationRepository->get($organizationId);
32
-        foreach($users as $user){
32
+        foreach ($users as $user) {
33 33
             $email = $user['email'];
34 34
             $firstname = isset($user['firstname']) ? $user['firstname'] : '';
35 35
             $lastname = isset($user['lastname']) ? $user['lastname'] : '';
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Organizations/RevokeUserAsAdminOrganization.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 revoke(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/Organizations/EditOrganization.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     public function edit(string $organizationId, string $name, array $picture, array $address)
22 22
     {
23 23
         $organization = $this->organizationRepository->get($organizationId);
24
-        if(!isset($organization)){
24
+        if (!isset($organization)) {
25 25
             throw new OrganizationNotFound();
26 26
         }
27 27
         $this->validateData($name, $picture, $address);
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Organizations/Model/Organization.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
 
34 34
     public function create(string $ext = 'jpg')
35 35
     {
36
-        if($this->pathPicture !== "") {
36
+        if ($this->pathPicture !== "") {
37 37
             $picture = new Picture($this->pathPicture);
38
-            $picture->resize('app/public/organizations/' . $this->id . '.' . $ext);
39
-            $this->pathPicture = 'app/public/organizations/' . $this->id . '.' . $ext;
38
+            $picture->resize('app/public/organizations/'.$this->id.'.'.$ext);
39
+            $this->pathPicture = 'app/public/organizations/'.$this->id.'.'.$ext;
40 40
         }
41 41
 
42 42
         app(OrganizationRepository::class)->add($this);
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
     {
47 47
         $this->name = $name;
48 48
         $this->address = $address;
49
-        if($picture['path'] !== "") {
49
+        if ($picture['path'] !== "") {
50 50
             $logo = new Picture($picture['path']);
51 51
             $ext = $picture['ext'];
52
-            $logo->resize('app/public/organizations/' . $this->id . '.' . $ext);
53
-            $this->pathPicture = 'app/public/organizations/' . $this->id . '.' . $ext;
52
+            $logo->resize('app/public/organizations/'.$this->id.'.'.$ext);
53
+            $this->pathPicture = 'app/public/organizations/'.$this->id.'.'.$ext;
54 54
         }
55 55
         app(OrganizationRepository::class)->update($this);
56 56
     }
Please login to merge, or discard this patch.
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.