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