@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | $previewVersion = ''; |
122 | 122 | if ($file instanceof IVersionedPreviewFile) { |
123 | - $previewVersion = $file->getPreviewVersion() . '-'; |
|
123 | + $previewVersion = $file->getPreviewVersion().'-'; |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | // Get the max preview and infer the max preview sizes from that |
@@ -199,8 +199,8 @@ discard block |
||
199 | 199 | continue; |
200 | 200 | } |
201 | 201 | |
202 | - $maxWidth = (int)$this->config->getSystemValue('preview_max_x', 4096); |
|
203 | - $maxHeight = (int)$this->config->getSystemValue('preview_max_y', 4096); |
|
202 | + $maxWidth = (int) $this->config->getSystemValue('preview_max_x', 4096); |
|
203 | + $maxHeight = (int) $this->config->getSystemValue('preview_max_y', 4096); |
|
204 | 204 | |
205 | 205 | $preview = $this->helper->getThumbnail($provider, $file, $maxWidth, $maxHeight); |
206 | 206 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | continue; |
217 | 217 | } |
218 | 218 | |
219 | - $path = $prefix . (string)$preview->width() . '-' . (string)$preview->height() . '-max.' . $ext; |
|
219 | + $path = $prefix.(string) $preview->width().'-'.(string) $preview->height().'-max.'.$ext; |
|
220 | 220 | try { |
221 | 221 | $file = $previewFolder->newFile($path); |
222 | 222 | $file->putContent($preview->data()); |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | */ |
239 | 239 | private function getPreviewSize(ISimpleFile $file, string $prefix = '') { |
240 | 240 | $size = explode('-', substr($file->getName(), strlen($prefix))); |
241 | - return [(int)$size[0], (int)$size[1]]; |
|
241 | + return [(int) $size[0], (int) $size[1]]; |
|
242 | 242 | } |
243 | 243 | |
244 | 244 | /** |
@@ -250,13 +250,13 @@ discard block |
||
250 | 250 | * @return string |
251 | 251 | */ |
252 | 252 | private function generatePath($width, $height, $crop, $mimeType, $prefix) { |
253 | - $path = $prefix . (string)$width . '-' . (string)$height; |
|
253 | + $path = $prefix.(string) $width.'-'.(string) $height; |
|
254 | 254 | if ($crop) { |
255 | 255 | $path .= '-crop'; |
256 | 256 | } |
257 | 257 | |
258 | 258 | $ext = $this->getExtention($mimeType); |
259 | - $path .= '.' . $ext; |
|
259 | + $path .= '.'.$ext; |
|
260 | 260 | return $path; |
261 | 261 | } |
262 | 262 | |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | $height /= $ratio; |
347 | 347 | } |
348 | 348 | |
349 | - return [(int)round($width), (int)round($height)]; |
|
349 | + return [(int) round($width), (int) round($height)]; |
|
350 | 350 | } |
351 | 351 | |
352 | 352 | /** |
@@ -382,10 +382,10 @@ discard block |
||
382 | 382 | $scaleH = $maxHeight / $widthR; |
383 | 383 | $scaleW = $width; |
384 | 384 | } |
385 | - $preview->preciseResize((int)round($scaleW), (int)round($scaleH)); |
|
385 | + $preview->preciseResize((int) round($scaleW), (int) round($scaleH)); |
|
386 | 386 | } |
387 | - $cropX = (int)floor(abs($width - $preview->width()) * 0.5); |
|
388 | - $cropY = (int)floor(abs($height - $preview->height()) * 0.5); |
|
387 | + $cropX = (int) floor(abs($width - $preview->width()) * 0.5); |
|
388 | + $cropY = (int) floor(abs($height - $preview->height()) * 0.5); |
|
389 | 389 | $preview->crop($cropX, $cropY, $width, $height); |
390 | 390 | } else { |
391 | 391 | $preview->resize(max($width, $height)); |