Passed
Push — master ( 427ebd...80d980 )
by Bertrand
14:55 queued 07:32
created
app/Src/UseCases/Domain/Agricultural/Dto/ContextDto.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         $this->postalCode = $postalCode;
23 23
         $this->department = (new PostalCode($postalCode))->department();
24 24
         $this->characteristics = $characteristics;
25
-        foreach($this->characteristics as $characteristic){
25
+        foreach ($this->characteristics as $characteristic) {
26 26
             $this->characteristicsByType[$characteristic->type()][] = $characteristic;
27 27
         }
28 28
     }
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Agricultural/Dto/CharacteristicDto.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     private $type;
13 13
     private $icon;
14 14
 
15
-    public function __construct(string $uuid,  string $label, string $type, ?string $icon, $prettyLabel)
15
+    public function __construct(string $uuid, string $label, string $type, ?string $icon, $prettyLabel)
16 16
     {
17 17
         $this->uuid = $uuid;
18 18
         $this->label = $label;
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Agricultural/Model/PostalCode.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@
 block discarded – undo
15 15
 
16 16
     public function department():string
17 17
     {
18
-        if(substr($this->postalCode, 0, 2) > 96){
19
-            return substr($this->postalCode, 0,3);
18
+        if (substr($this->postalCode, 0, 2) > 96) {
19
+            return substr($this->postalCode, 0, 3);
20 20
         }
21
-        return substr($this->postalCode, 0,2);
21
+        return substr($this->postalCode, 0, 2);
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Shared/Model/Picture.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,17 +22,17 @@
 block discarded – undo
22 22
     {
23 23
         $relativePath = $newPath;
24 24
         $finalNewPath = storage_path().'/'.$newPath;
25
-        if(isset($this->ext)){
25
+        if (isset($this->ext)) {
26 26
             $finalNewPath = storage_path().'/'.$newPath.'.'.$this->ext;
27 27
             $relativePath = $newPath.'.'.$this->ext;
28 28
         }
29
-        if(app(PictureHandler::class)->width($this->path) > 600) {
29
+        if (app(PictureHandler::class)->width($this->path) > 600) {
30 30
             app(PictureHandler::class)->widen($this->path, $finalNewPath, 600);
31 31
             $this->relativePath = $relativePath;
32 32
             return;
33 33
         }
34 34
 
35
-        if(app(PictureHandler::class)->height($this->path) > 400) {
35
+        if (app(PictureHandler::class)->height($this->path) > 400) {
36 36
             app(PictureHandler::class)->heighten($this->path, $finalNewPath, 400);
37 37
             $this->relativePath = $relativePath;
38 38
             return;
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Ports/ContextRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,5 +11,5 @@
 block discarded – undo
11 11
 {
12 12
     public function getByUser(string $userId);
13 13
     public function add(Context $exploitation, string $userId);
14
-    public function getByUserDto(string $userId):?ContextDto;
14
+    public function getByUserDto(string $userId): ?ContextDto;
15 15
 }
Please login to merge, or discard this patch.
Domain/Organizations/Invitation/RespondInvitationToAnOrganization.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,23 +39,23 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Domain/Organizations/Invitation/PrepareInvitationUsersInOrganization.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
         $usersLoop = $this->getUsersToProcess($users, $usersLoop, $filePathUsers);
24 24
         $errors = $imported = 0;
25 25
 
26
-        foreach($usersLoop as $userToInvite){
26
+        foreach ($usersLoop as $userToInvite) {
27 27
             $validator = $this->validateUserData($userToInvite);
28
-            if($validator->fails()){
28
+            if ($validator->fails()) {
29 29
                 $userToInvite['error'] = 'email.error.syntax';
30 30
                 $usersToProcess['users'][] = $userToInvite;
31 31
                 $errors++;
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             list($userToInvite, $errors) = $this->checkIfUserAlreadyIn($organizationId, $userToInvite, $errors);
36 36
 
37 37
             $usersToProcess['users'][] = $userToInvite;
38
-            if(!isset($userToInvite["error"])){
38
+            if (!isset($userToInvite["error"])) {
39 39
                 $imported++;
40 40
             }
41 41
         }
Please login to merge, or discard this patch.
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.