@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | public function syncContentBlocks(Request $request) |
| 39 | 39 | { |
| 40 | 40 | foreach ($this->getContentBlockCollectionNames() as $collection) { |
| 41 | - if (! $request->has("content_blocks_{$collection}")) { |
|
| 41 | + if (!$request->has("content_blocks_{$collection}")) { |
|
| 42 | 42 | continue; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | protected function syncContentBlockCollection(array $data, string $collection) |
| 53 | 53 | { |
| 54 | - $contentBlocks = collect($data)->map(function (array $attributes, int $i): ContentBlock { |
|
| 54 | + $contentBlocks = collect($data)->map(function(array $attributes, int $i): ContentBlock { |
|
| 55 | 55 | return ContentBlock::findOrFail($attributes['id']) |
| 56 | 56 | ->updateWithAttributes($attributes) |
| 57 | 57 | ->setOrder($i); |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | foreach ($this->mediaLibraryCollectionNames() as $collection) { |
| 58 | - if (! isset($values[$collection])) { |
|
| 58 | + if (!isset($values[$collection])) { |
|
| 59 | 59 | continue; |
| 60 | 60 | } |
| 61 | 61 | $this->updateMedia($values[$collection], $collection); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | protected function getMediaAttributes(ContentBlock $contentBlock): array |
| 26 | 26 | { |
| 27 | - return array_reduce($contentBlock->mediaLibraryCollectionNames(), function ($mediaAttributes, $collectionName) use ($contentBlock) { |
|
| 27 | + return array_reduce($contentBlock->mediaLibraryCollectionNames(), function($mediaAttributes, $collectionName) use ($contentBlock) { |
|
| 28 | 28 | $mediaAttributes[$collectionName] = fractal($contentBlock->getMedia($collectionName), new MediaTransformer())->toArray(); |
| 29 | 29 | |
| 30 | 30 | return $mediaAttributes; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | protected function getTranslatedAttributes(ContentBlock $contentBlock): array |
| 35 | 35 | { |
| 36 | - return array_reduce($contentBlock->translatable, function ($translatables, $attribute) use ($contentBlock) { |
|
| 36 | + return array_reduce($contentBlock->translatable, function($translatables, $attribute) use ($contentBlock) { |
|
| 37 | 37 | foreach (config('app.locales') as $locale) { |
| 38 | 38 | $translatables[$attribute][$locale] = $contentBlock->getTranslation($attribute, $locale); |
| 39 | 39 | } |