@@ -113,7 +113,7 @@ |
||
113 | 113 | |
114 | 114 | $params = ['fp-x' => $fpX, 'fp-y' => $fpY, 'fp-z' => $fpZ]; |
115 | 115 | |
116 | - return array_map(function ($param) { |
|
116 | + return array_map(function($param) { |
|
117 | 117 | return number_format($param, 4, ".", ""); |
118 | 118 | }, $params) + ['crop' => 'focalpoint', 'fit' => 'crop']; |
119 | 119 | } |
@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | protected static function bootHasPosition() |
9 | 9 | { |
10 | - static::creating(function ($model) { |
|
10 | + static::creating(function($model) { |
|
11 | 11 | $model->setToLastPosition(); |
12 | 12 | }); |
13 | 13 | } |
@@ -32,12 +32,12 @@ |
||
32 | 32 | public function scopeVisible($query) |
33 | 33 | { |
34 | 34 | if ($this->isFillable('publish_start_date')) { |
35 | - $query->where(function ($query) { |
|
35 | + $query->where(function($query) { |
|
36 | 36 | $query->whereNull('publish_start_date')->orWhere('publish_start_date', '<=', Carbon::now()); |
37 | 37 | }); |
38 | 38 | |
39 | 39 | if ($this->isFillable('publish_end_date')) { |
40 | - $query->where(function ($query) { |
|
40 | + $query->where(function($query) { |
|
41 | 41 | $query->whereNull('publish_end_date')->orWhere('publish_end_date', '>=', Carbon::now()); |
42 | 42 | }); |
43 | 43 | } |
@@ -14,8 +14,8 @@ |
||
14 | 14 | public function rules() |
15 | 15 | { |
16 | 16 | switch ($this->method()) { |
17 | - case 'POST':{return $this->rulesForCreate();} |
|
18 | - case 'PUT':{return $this->rulesForUpdate();} |
|
17 | + case 'POST':{return $this->rulesForCreate(); } |
|
18 | + case 'PUT':{return $this->rulesForUpdate(); } |
|
19 | 19 | default:break; |
20 | 20 | } |
21 | 21 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | { |
6 | 6 | if (!app()->environment('local', 'development')) { |
7 | 7 | try { |
8 | - $manifest = Cache::rememberForever('rev-manifest', function () { |
|
8 | + $manifest = Cache::rememberForever('rev-manifest', function() { |
|
9 | 9 | return json_decode(file_get_contents(config('twill.frontend.rev_manifest_path')), true); |
10 | 10 | }); |
11 | 11 |
@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | $manageMultipleLanguages = count(getLocales()) > 1; |
24 | 24 | if ($manageMultipleLanguages && $translate) { |
25 | - $allLanguages = Collection::make(config('translatable.locales'))->map(function ($locale, $index) use ($form_fields) { |
|
25 | + $allLanguages = Collection::make(config('translatable.locales'))->map(function($locale, $index) use ($form_fields) { |
|
26 | 26 | return [ |
27 | 27 | 'shortlabel' => strtoupper($locale), |
28 | 28 | 'label' => getLanguageLabelFromLocaleCode($locale), |
@@ -16,12 +16,12 @@ discard block |
||
16 | 16 | { |
17 | 17 | $locale = $locale ?? app()->getLocale(); |
18 | 18 | |
19 | - $file = $this->files->first(function ($file) use ($role, $locale) { |
|
19 | + $file = $this->files->first(function($file) use ($role, $locale) { |
|
20 | 20 | return $file->pivot->role === $role && $file->pivot->locale === $locale; |
21 | 21 | }); |
22 | 22 | |
23 | 23 | if (!$file && config('translatable.use_property_fallback', false)) { |
24 | - $file = $this->files->first(function ($file) use ($role) { |
|
24 | + $file = $this->files->first(function($file) use ($role) { |
|
25 | 25 | return $file->pivot->role === $role && $file->pivot->locale === config('translatable.fallback_locale'); |
26 | 26 | }); |
27 | 27 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | { |
48 | 48 | $locale = $locale ?? app()->getLocale(); |
49 | 49 | |
50 | - $files = $this->files->filter(function ($file) use ($role, $locale) { |
|
50 | + $files = $this->files->filter(function($file) use ($role, $locale) { |
|
51 | 51 | return $file->pivot->role === $role && $file->pivot->locale === $locale; |
52 | 52 | }); |
53 | 53 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | return $this->relatedCache[$browser_name] = $this->relatedItems |
33 | 33 | ->where('browser_name', $browser_name) |
34 | - ->map(function ($item) { |
|
34 | + ->map(function($item) { |
|
35 | 35 | return $item->related; |
36 | 36 | }); |
37 | 37 | } |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | |
47 | 47 | $position = 1; |
48 | 48 | |
49 | - Collection::make($items)->map(function ($item) { |
|
49 | + Collection::make($items)->map(function($item) { |
|
50 | 50 | return Arr::only($item, ['endpointType', 'id']); |
51 | - })->each(function ($values) use ($browser_name, &$position) { |
|
51 | + })->each(function($values) use ($browser_name, &$position) { |
|
52 | 52 | RelatedItem::create([ |
53 | 53 | 'subject_id' => $this->getKey(), |
54 | 54 | 'subject_type' => $this->getMorphClass(), |
@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | public function scopeForBucket($query, $bucketKey) |
23 | 23 | { |
24 | - return $query->where('bucket_key', $bucketKey)->get()->map(function ($feature) { |
|
24 | + return $query->where('bucket_key', $bucketKey)->get()->map(function($feature) { |
|
25 | 25 | return $feature->featured; |
26 | 26 | })->filter(); |
27 | 27 | } |