@@ -144,17 +144,17 @@ discard block |
||
144 | 144 | $ext = pathinfo($this->original, PATHINFO_EXTENSION); |
145 | 145 | |
146 | 146 | // We remove extension from file name so we can append thumbnail type |
147 | - $fileName = Str::replaceLast('.' . $ext, '', $this->original); |
|
147 | + $fileName = Str::replaceLast('.'.$ext, '', $this->original); |
|
148 | 148 | |
149 | 149 | // We merge original name + thumbnail name + extension |
150 | - $path = $fileName . '-' . $name . '.' . $ext; |
|
150 | + $path = $fileName.'-'.$name.'.'.$ext; |
|
151 | 151 | |
152 | 152 | if ($this->storage->exists($path)) { |
153 | 153 | $this->storage->delete($path); |
154 | 154 | } |
155 | 155 | |
156 | 156 | if ($webp['quality'] && $webp['thumb']) { |
157 | - $webpThumbPath = $fileName . '-' . $name . '.webp'; |
|
157 | + $webpThumbPath = $fileName.'-'.$name.'.webp'; |
|
158 | 158 | if ($this->storage->exists($webpThumbPath)) { |
159 | 159 | $this->storage->delete($webpThumbPath); |
160 | 160 | } |
@@ -177,17 +177,17 @@ discard block |
||
177 | 177 | $ext = pathinfo($this->name, PATHINFO_EXTENSION); |
178 | 178 | |
179 | 179 | // We remove extension from file name so we can append thumbnail type |
180 | - $fileName = Str::replaceLast('.' . $ext, '', $this->name); |
|
180 | + $fileName = Str::replaceLast('.'.$ext, '', $this->name); |
|
181 | 181 | |
182 | 182 | // We merge original name + thumbnail name + extension |
183 | - $path = $fileName . '-' . $name . '.' . $ext; |
|
183 | + $path = $fileName.'-'.$name.'.'.$ext; |
|
184 | 184 | |
185 | 185 | /** @var \Intervention\Image\Image $image */ |
186 | 186 | $image = InterventionImage::make($file); |
187 | 187 | |
188 | 188 | $action = $size[2] ?? 'resize'; |
189 | 189 | // Resize image with aspect ratio |
190 | - $image->$action($size[0], $size[1], function (Constraint $constraint) { |
|
190 | + $image->$action($size[0], $size[1], function(Constraint $constraint) { |
|
191 | 191 | $constraint->aspectRatio(); |
192 | 192 | })->resizeCanvas($size[0], $size[1], 'center', false, '#ffffff'); |
193 | 193 | |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | |
196 | 196 | if ($webp['quality'] && $webp['thumb']) { |
197 | 197 | // generate webp via thumbnail image |
198 | - $webpThumbPath = $fileName . '-' . $name . '.webp'; |
|
198 | + $webpThumbPath = $fileName.'-'.$name.'.webp'; |
|
199 | 199 | $this->storage->put("{$this->getDirectory()}/{$webpThumbPath}", $image->encode('webp', $webp['quality']), $this->storagePermission ?? null); |
200 | 200 | } |
201 | 201 | } |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | |
219 | 219 | if ($webp['quality']) { |
220 | 220 | $ext = pathinfo($this->name, PATHINFO_EXTENSION); |
221 | - $path = Str::replaceLast('.' . $ext, '', $this->name) . '.webp'; |
|
221 | + $path = Str::replaceLast('.'.$ext, '', $this->name).'.webp'; |
|
222 | 222 | $image = InterventionImage::make($file); |
223 | 223 | |
224 | 224 | $this->storage->put("{$this->getDirectory()}/{$path}", $image->encode(), $this->storagePermission ?? null); |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | $ext = pathinfo($this->original, PATHINFO_EXTENSION); |
238 | 238 | |
239 | 239 | // We remove extension from file name so we can append thumbnail type |
240 | - $path = Str::replaceLast('.' . $ext, '', $this->original) . '.webp'; |
|
240 | + $path = Str::replaceLast('.'.$ext, '', $this->original).'.webp'; |
|
241 | 241 | |
242 | 242 | if ($this->storage->exists($path)) { |
243 | 243 | $this->storage->delete($path); |