Passed
Push — master ( b6c034...979f40 )
by John
40:53 queued 23:59
created
lib/private/Preview/Generator.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
 		$previewVersion = '';
144 144
 		if ($file instanceof IVersionedPreviewFile) {
145
-			$previewVersion = $file->getPreviewVersion() . '-';
145
+			$previewVersion = $file->getPreviewVersion().'-';
146 146
 		}
147 147
 
148 148
 		// If imaginary is enabled, and we request a small thumbnail,
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 	 */
426 426
 	private function getPreviewSize(ISimpleFile $file, string $prefix = '') {
427 427
 		$size = explode('-', substr($file->getName(), strlen($prefix)));
428
-		return [(int)$size[0], (int)$size[1]];
428
+		return [(int) $size[0], (int) $size[1]];
429 429
 	}
430 430
 
431 431
 	/**
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
 	 * @return string
439 439
 	 */
440 440
 	private function generatePath($width, $height, $crop, $max, $mimeType, $prefix) {
441
-		$path = $prefix . (string)$width . '-' . (string)$height;
441
+		$path = $prefix.(string) $width.'-'.(string) $height;
442 442
 		if ($crop) {
443 443
 			$path .= '-crop';
444 444
 		}
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 		}
448 448
 
449 449
 		$ext = $this->getExtension($mimeType);
450
-		$path .= '.' . $ext;
450
+		$path .= '.'.$ext;
451 451
 		return $path;
452 452
 	}
453 453
 
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 			$height /= $ratio;
537 537
 		}
538 538
 
539
-		return [(int)round($width), (int)round($height)];
539
+		return [(int) round($width), (int) round($height)];
540 540
 	}
541 541
 
542 542
 	/**
@@ -574,10 +574,10 @@  discard block
 block discarded – undo
574 574
 						$scaleH = $maxHeight / $widthR;
575 575
 						$scaleW = $width;
576 576
 					}
577
-					$preview = $preview->preciseResizeCopy((int)round($scaleW), (int)round($scaleH));
577
+					$preview = $preview->preciseResizeCopy((int) round($scaleW), (int) round($scaleH));
578 578
 				}
579
-				$cropX = (int)floor(abs($width - $preview->width()) * 0.5);
580
-				$cropY = (int)floor(abs($height - $preview->height()) * 0.5);
579
+				$cropX = (int) floor(abs($width - $preview->width()) * 0.5);
580
+				$cropY = (int) floor(abs($height - $preview->height()) * 0.5);
581 581
 				$preview = $preview->cropCopy($cropX, $cropY, $width, $height);
582 582
 			} else {
583 583
 				$preview = $maxPreview->resizeCopy(max($width, $height));
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
 	 */
632 632
 	private function getPreviewFolder(File $file) {
633 633
 		// Obtain file id outside of try catch block to prevent the creation of an existing folder
634
-		$fileId = (string)$file->getId();
634
+		$fileId = (string) $file->getId();
635 635
 
636 636
 		try {
637 637
 			$folder = $this->appData->getFolder($fileId);
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
 			case 'image/gif':
657 657
 				return 'gif';
658 658
 			default:
659
-				throw new \InvalidArgumentException('Not a valid mimetype: "' . $mimeType . '"');
659
+				throw new \InvalidArgumentException('Not a valid mimetype: "'.$mimeType.'"');
660 660
 		}
661 661
 	}
662 662
 }
Please login to merge, or discard this patch.