Completed
Pull Request — fix/document-upload-locale (#356)
by Philippe
134:11 queued 125:42
created
src/Fields/Types/MediaField.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Thinktomorrow\Chief\Fields\Types;
6 6
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             return $this;
41 41
         }
42 42
 
43
-        return 'files['. ($this->values['name'] ?? $this->key()).']';
43
+        return 'files['.($this->values['name'] ?? $this->key()).']';
44 44
     }
45 45
 
46 46
     public function sluggifyName()
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $images = [];
59 59
         $locale = $locale ?? app()->getLocale();
60 60
 
61
-        $assets = $model->assetRelation->where('pivot.type', $this->key())->filter(function ($asset) use ($locale) {
61
+        $assets = $model->assetRelation->where('pivot.type', $this->key())->filter(function($asset) use ($locale) {
62 62
             return $asset->pivot->locale == $locale;
63 63
         })->sortBy('pivot.order');
64 64
 
Please login to merge, or discard this patch.