Passed
Push — master ( eab33a...93cd42 )
by Innocent
04:10
created
src/Traits/SavesToAmazonS3.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     protected function saveFiles($model)
20 20
     {
21
-        if (! in_array(StorageTrait::class, class_uses($model))) {
21
+        if (!in_array(StorageTrait::class, class_uses($model))) {
22 22
             throw new InvalidArgumentException('The model you used does not use the Storage trait');
23 23
         }
24 24
 
Please login to merge, or discard this patch.
src/Traits/UploadsImages.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,20 +20,20 @@
 block discarded – undo
20 20
      */
21 21
     protected function uploadImages($model, array $images, ImageManager $imageManager, string $fileName = null)
22 22
     {
23
-        if (! in_array(StorageTrait::class, class_uses($model))) {
23
+        if (!in_array(StorageTrait::class, class_uses($model))) {
24 24
             throw new InvalidArgumentException('The model you used does not use the Storage trait');
25 25
         }
26 26
 
27
-        if (! in_array(ImageableTrait::class, class_uses($model))) {
27
+        if (!in_array(ImageableTrait::class, class_uses($model))) {
28 28
             throw new InvalidArgumentException('The model you used does not use the Imageable trait');
29 29
         }
30 30
 
31 31
         foreach ($images as $imageData) {
32
-            if (! $fileName) {
33
-                $fileName = str_shuffle($model->id.time().time()).'.png';
32
+            if (!$fileName) {
33
+                $fileName = str_shuffle($model->id . time() . time()) . '.png';
34 34
                 $this->isNew = false;
35 35
             }
36
-            $ogSave = storage_path('app/public/'.$model->filesDir().'/original/').$fileName;
36
+            $ogSave = storage_path('app/public/' . $model->filesDir() . '/original/') . $fileName;
37 37
             try {
38 38
                 $imageManager->make($imageData)->save($ogSave);
39 39
 
Please login to merge, or discard this patch.
src/Traits/ProcessesImages.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      */
18 18
     protected function processImage(ImageManager $imageManager, $model)
19 19
     {
20
-        if (! in_array(StorageTrait::class, class_uses($model))) {
20
+        if (!in_array(StorageTrait::class, class_uses($model))) {
21 21
             throw new InvalidArgumentException('The model you used does not use the Storage trait');
22 22
         }
23 23
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
                     try {
35 35
                         $thumbNail = $this->getImage($model->filesDir(), $image->name, $thumbNailsDimension);
36 36
                         $imageManager->make($originalFile)->fit($thumbNailsDimension, $thumbNailsDimension,
37
-                            function ($constraint) {
37
+                            function($constraint) {
38 38
                                 $constraint->upsize();
39 39
                                 $constraint->aspectRatio();
40 40
                             }, 'center')->save($thumbNail);
Please login to merge, or discard this patch.
src/Jobs/Users/UploadImage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@
 block discarded – undo
53 53
         if ($this->image) {
54 54
             if ($this->user->image()->exists()) {
55 55
                 $fileName = $this->user->image->name;
56
-                $this->uploadImages($this->user, [$this->image], $imageManager, $fileName);
56
+                $this->uploadImages($this->user, [ $this->image ], $imageManager, $fileName);
57 57
             } else {
58
-                $this->uploadImages($this->user, [$this->image], $imageManager);
58
+                $this->uploadImages($this->user, [ $this->image ], $imageManager);
59 59
             }
60 60
         }
61 61
     }
Please login to merge, or discard this patch.