@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | $previewVersion = ''; |
| 136 | 136 | if ($file instanceof IVersionedPreviewFile) { |
| 137 | - $previewVersion = $file->getPreviewVersion() . '-'; |
|
| 137 | + $previewVersion = $file->getPreviewVersion().'-'; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | // If imaginary is enabled, and we request a small thumbnail, |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | continue; |
| 338 | 338 | } |
| 339 | 339 | |
| 340 | - $path = $prefix . (string)$preview->width() . '-' . (string)$preview->height() . '-max.' . $ext; |
|
| 340 | + $path = $prefix.(string) $preview->width().'-'.(string) $preview->height().'-max.'.$ext; |
|
| 341 | 341 | try { |
| 342 | 342 | $file = $previewFolder->newFile($path); |
| 343 | 343 | if ($preview instanceof IStreamImage) { |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | */ |
| 364 | 364 | private function getPreviewSize(ISimpleFile $file, string $prefix = '') { |
| 365 | 365 | $size = explode('-', substr($file->getName(), strlen($prefix))); |
| 366 | - return [(int)$size[0], (int)$size[1]]; |
|
| 366 | + return [(int) $size[0], (int) $size[1]]; |
|
| 367 | 367 | } |
| 368 | 368 | |
| 369 | 369 | /** |
@@ -375,13 +375,13 @@ discard block |
||
| 375 | 375 | * @return string |
| 376 | 376 | */ |
| 377 | 377 | private function generatePath($width, $height, $crop, $mimeType, $prefix) { |
| 378 | - $path = $prefix . (string)$width . '-' . (string)$height; |
|
| 378 | + $path = $prefix.(string) $width.'-'.(string) $height; |
|
| 379 | 379 | if ($crop) { |
| 380 | 380 | $path .= '-crop'; |
| 381 | 381 | } |
| 382 | 382 | |
| 383 | 383 | $ext = $this->getExtention($mimeType); |
| 384 | - $path .= '.' . $ext; |
|
| 384 | + $path .= '.'.$ext; |
|
| 385 | 385 | return $path; |
| 386 | 386 | } |
| 387 | 387 | |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | $height /= $ratio; |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | - return [(int)round($width), (int)round($height)]; |
|
| 474 | + return [(int) round($width), (int) round($height)]; |
|
| 475 | 475 | } |
| 476 | 476 | |
| 477 | 477 | /** |
@@ -506,10 +506,10 @@ discard block |
||
| 506 | 506 | $scaleH = $maxHeight / $widthR; |
| 507 | 507 | $scaleW = $width; |
| 508 | 508 | } |
| 509 | - $preview = $preview->preciseResizeCopy((int)round($scaleW), (int)round($scaleH)); |
|
| 509 | + $preview = $preview->preciseResizeCopy((int) round($scaleW), (int) round($scaleH)); |
|
| 510 | 510 | } |
| 511 | - $cropX = (int)floor(abs($width - $preview->width()) * 0.5); |
|
| 512 | - $cropY = (int)floor(abs($height - $preview->height()) * 0.5); |
|
| 511 | + $cropX = (int) floor(abs($width - $preview->width()) * 0.5); |
|
| 512 | + $cropY = (int) floor(abs($height - $preview->height()) * 0.5); |
|
| 513 | 513 | $preview = $preview->cropCopy($cropX, $cropY, $width, $height); |
| 514 | 514 | } else { |
| 515 | 515 | $preview = $maxPreview->resizeCopy(max($width, $height)); |
@@ -574,7 +574,7 @@ discard block |
||
| 574 | 574 | case 'image/gif': |
| 575 | 575 | return 'gif'; |
| 576 | 576 | default: |
| 577 | - throw new \InvalidArgumentException('Not a valid mimetype: "' . $mimeType . '"'); |
|
| 577 | + throw new \InvalidArgumentException('Not a valid mimetype: "'.$mimeType.'"'); |
|
| 578 | 578 | } |
| 579 | 579 | } |
| 580 | 580 | } |