Test Setup Failed
Branch user/international-postal-code... (b53ac3)
by Bertrand
08:58
created
app/Src/UseCases/Domain/Users/GetAvatar.php 1 patch
Braces   +17 added lines, -13 removed lines patch added patch discarded remove patch
@@ -22,22 +22,26 @@  discard block
 block discarded – undo
22 22
     {
23 23
         $user = $this->userRepository->getById($uuid);
24 24
 
25
-        if ($noDefault === true)
26
-            $pathPicture = null;
27
-        else
28
-            $pathPicture = public_path(config('neayi.default_avatar'));
25
+        if ($noDefault === true) {
26
+                    $pathPicture = null;
27
+        } else {
28
+                    $pathPicture = public_path(config('neayi.default_avatar'));
29
+        }
29 30
 
30
-        if (!empty($user))
31
-            $pathPicture = $this->getPathPicture($user, $noDefault);
31
+        if (!empty($user)) {
32
+                    $pathPicture = $this->getPathPicture($user, $noDefault);
33
+        }
32 34
 
33 35
         if($pathPicture === null){
34
-            if (empty($firstLetter) && !empty($user))
35
-                $firstLetter = $user->fullname;
36
+            if (empty($firstLetter) && !empty($user)) {
37
+                            $firstLetter = $user->fullname;
38
+            }
36 39
 
37
-            if (!empty($color))
38
-                return Avatar::create($firstLetter)->setBackground('#' . $color)->getImageObject()->response();
39
-            else
40
-                return Avatar::create($firstLetter)->getImageObject()->response();
40
+            if (!empty($color)) {
41
+                            return Avatar::create($firstLetter)->setBackground('#' . $color)->getImageObject()->response();
42
+            } else {
43
+                            return Avatar::create($firstLetter)->getImageObject()->response();
44
+            }
41 45
         }
42 46
 
43 47
         $img = Image::make($pathPicture);
@@ -49,7 +53,7 @@  discard block
 block discarded – undo
49 53
                 $image->make($pathPicture)->widen($dim, function ($constraint) {
50 54
                     $constraint->upsize();
51 55
                 });
52
-            }else{
56
+            } else{
53 57
                 $image->make($pathPicture)->heighten($dim, function ($constraint) {
54 58
                     $constraint->upsize();
55 59
                 });
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Context/Queries/GetIcon.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@  discard block
 block discarded – undo
13 13
         $pathPicture = storage_path('app/public/characteristics/'.$uuid.'.png');
14 14
 
15 15
         // Sometimes there's no picture for the characteristic. Return an empty pixel.
16
-        if (!file_exists($pathPicture))
17
-            $pathPicture = app_path('../public/images/empty-pixel.gif');
16
+        if (!file_exists($pathPicture)) {
17
+                    $pathPicture = app_path('../public/images/empty-pixel.gif');
18
+        }
18 19
         
19 20
         $img = Image::make($pathPicture);
20 21
         $h = $img->height();
@@ -29,7 +30,7 @@  discard block
 block discarded – undo
29 30
                 $image->make($pathPicture)->widen($dim, function ($constraint) {
30 31
                     $constraint->upsize();
31 32
                 });
32
-            }else{
33
+            } else{
33 34
                 $image->make($pathPicture)->heighten($dim, function ($constraint) {
34 35
                     $constraint->upsize();
35 36
                 });
Please login to merge, or discard this patch.