@@ -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 | } |
@@ -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 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $items = $this->getIndexItems($scopes); |
| 95 | 95 | |
| 96 | 96 | return [ |
| 97 | - 'items' => $items->map(function ($item) { |
|
| 97 | + 'items' => $items->map(function($item) { |
|
| 98 | 98 | return $item->toCmsArray(); |
| 99 | 99 | })->toArray(), |
| 100 | 100 | 'maxPage' => $items->lastPage(), |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | { |
| 217 | 217 | $ids = explode(',', $this->request->input('ids')); |
| 218 | 218 | |
| 219 | - $metadatasFromRequest = $this->getExtraMetadatas()->reject(function ($meta) { |
|
| 219 | + $metadatasFromRequest = $this->getExtraMetadatas()->reject(function($meta) { |
|
| 220 | 220 | return is_null($meta); |
| 221 | 221 | })->toArray(); |
| 222 | 222 | |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | $items = $this->getIndexItems($scopes); |
| 241 | 241 | |
| 242 | 242 | return $this->responseFactory->json([ |
| 243 | - 'items' => $items->map(function ($item) { |
|
| 243 | + 'items' => $items->map(function($item) { |
|
| 244 | 244 | return $item->toCmsArray(); |
| 245 | 245 | })->toArray(), |
| 246 | 246 | 'tags' => $this->repository->getTagsList(), |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | */ |
| 280 | 280 | private function getExtraMetadatas() |
| 281 | 281 | { |
| 282 | - return Collection::make($this->customFields)->mapWithKeys(function ($field) { |
|
| 282 | + return Collection::make($this->customFields)->mapWithKeys(function($field) { |
|
| 283 | 283 | $fieldInRequest = $this->request->get($field['name']); |
| 284 | 284 | |
| 285 | 285 | if (isset($field['type']) && $field['type'] === 'checkbox') { |