Completed
Branch master (090677)
by Bertrand
11:12
created
Category
app/Src/UseCases/Domain/Users/GetUser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     public function get(string $userId):User
21 21
     {
22 22
         $user = $this->userRepository->getById($userId);
23
-        if(!isset($user)){
23
+        if (!isset($user)) {
24 24
             throw new UserNotFound();
25 25
         }
26 26
         return $user;
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Users/EditUser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     public function edit(string $userId, string $email, string $firstname, string $lastname, array $picture)
21 21
     {
22 22
         $user = $this->userRepository->getById($userId);
23
-        if(!isset($user)){
23
+        if (!isset($user)) {
24 24
             throw new UserNotFound();
25 25
         }
26 26
         $this->validateData($userId, $firstname, $lastname, $email, $picture);
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         if (isset($user) && $user->id() !== $userId) {
54 54
             $errors['email'] = __('validation.unique', ['attribute' => 'email']);
55 55
         }
56
-        $validator->after(function () use ($validator, $errors) {
56
+        $validator->after(function() use ($validator, $errors) {
57 57
             foreach ($errors as $field => $error) {
58 58
                 $validator->errors()->add($field, $error);
59 59
             }
Please login to merge, or discard this patch.
app/Src/UseCases/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/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/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/User.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     public function adminlte_image()
29 29
     {
30 30
         $urlPicture = $this->path_picture != "" ? asset('storage/'.str_replace('app/public/', '', $this->path_picture)) : null;
31
-        if($urlPicture === ""){
31
+        if ($urlPicture === "") {
32 32
             $urlPicture = 'http://dev.core.tripleperformance.com:8008/vendor/adminlte/dist/img/AdminLTELogo.png';
33 33
         }
34 34
         return $urlPicture;
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function adminlte_desc()
38 38
     {
39 39
         $desc = ucfirst($this->firstname).' '.ucfirst($this->lastname);
40
-        if($this->organization_id !== null){
40
+        if ($this->organization_id !== null) {
41 41
             $organization = app(OrganizationRepository::class)->get($this->organization_id);
42 42
             $desc .= ' - organisme : '.$organization->name();
43 43
         }
Please login to merge, or discard this patch.