Passed
Push — master ( 180558...0f1f7e )
by Innocent
03:30
created
src/Traits/UploadsImages.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,22 +20,22 @@
 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
             } else {
35 35
                 $this->isNew = false;
36 36
             }
37 37
 
38
-            $ogSave = storage_path('app/public/'.$model->filesDir().'/original/').$fileName;
38
+            $ogSave = storage_path('app/public/' . $model->filesDir() . '/original/') . $fileName;
39 39
 
40 40
             try {
41 41
                 $imageManager->make($imageData)->save($ogSave);
Please login to merge, or discard this patch.