@@ -9,7 +9,7 @@ |
||
9 | 9 | */ |
10 | 10 | public function modelGetter() |
11 | 11 | { |
12 | - $stubPath = __DIR__ . '/stubs/string.stub'; |
|
12 | + $stubPath = __DIR__.'/stubs/string.stub'; |
|
13 | 13 | |
14 | 14 | return self::getStub($stubPath, [ |
15 | 15 | 'field_camel' => studly_case($this->id()), |
@@ -132,12 +132,12 @@ |
||
132 | 132 | private function fieldsWithFallback(array $fields, string $locale): array |
133 | 133 | { |
134 | 134 | $fallbackLocale = Locale::fallback($locale); |
135 | - $file = $this->getFieldValue($fields, 'file', $locale, $fallbackLocale,[]); |
|
135 | + $file = $this->getFieldValue($fields, 'file', $locale, $fallbackLocale, []); |
|
136 | 136 | $details = isset($file['details']) ? $file['details'] : []; |
137 | 137 | |
138 | 138 | return [ |
139 | - 'title' => $this->getFieldValue($fields, 'title', $locale, $fallbackLocale,''), |
|
140 | - 'description' => $this->getFieldValue($fields, 'description', $locale, $fallbackLocale,''), |
|
139 | + 'title' => $this->getFieldValue($fields, 'title', $locale, $fallbackLocale, ''), |
|
140 | + 'description' => $this->getFieldValue($fields, 'description', $locale, $fallbackLocale, ''), |
|
141 | 141 | 'url' => isset($file['url']) ? $file['url'] : '', |
142 | 142 | 'file_name' => isset($file['fileName']) ? $file['fileName'] : '', |
143 | 143 | 'content_type' => isset($file['contentType']) ? $file['contentType'] : '', |
@@ -40,10 +40,10 @@ discard block |
||
40 | 40 | 'fm' => config('contentful.image.use_webp') ? $format : null, |
41 | 41 | 'fl' => static::detectProgressive($format, $useProgressive) ? 'progressive' : null, |
42 | 42 | 'fit' => static::detectFit($fit), |
43 | - ])->filter(function ($value) { |
|
43 | + ])->filter(function($value) { |
|
44 | 44 | return !empty($value); |
45 | - })->each(function ($value, $key) use (& $imageUrl) { |
|
46 | - $imageUrl .= $key . '=' . $value . '&'; |
|
45 | + })->each(function($value, $key) use (& $imageUrl) { |
|
46 | + $imageUrl .= $key.'='.$value.'&'; |
|
47 | 47 | }); |
48 | 48 | |
49 | 49 | return static::replaceHosts($url, $imageUrl); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $url = str_replace(explode(',', $searchHosts), $replaceHost, $url); |
68 | 68 | } |
69 | 69 | |
70 | - return !empty($url) ? $url . '?' . trim($imageUrl, '&') : ''; |
|
70 | + return !empty($url) ? $url.'?'.trim($imageUrl, '&') : ''; |
|
71 | 71 | |
72 | 72 | } |
73 | 73 |