Passed
Push — master ( 335af0...d4a44d )
by Roeland
16:33 queued 10s
created
lib/private/Preview/ProviderV2.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 	/**
44 44
 	 * @return string Regex with the mimetypes that are supported by this provider
45 45
 	 */
46
-	abstract public function getMimeType(): string ;
46
+	abstract public function getMimeType(): string;
47 47
 
48 48
 	/**
49 49
 	 * Check if a preview can be generated for $path
Please login to merge, or discard this patch.
lib/private/Preview/MP3.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,11 +49,11 @@
 block discarded – undo
49 49
 		$tags = $getID3->analyze($tmpPath);
50 50
 		$this->cleanTmpFiles();
51 51
 		$picture = isset($tags['id3v2']['APIC'][0]['data']) ? $tags['id3v2']['APIC'][0]['data'] : null;
52
-		if(is_null($picture) && isset($tags['id3v2']['PIC'][0]['data'])) {
52
+		if (is_null($picture) && isset($tags['id3v2']['PIC'][0]['data'])) {
53 53
 			$picture = $tags['id3v2']['PIC'][0]['data'];
54 54
 		}
55 55
 
56
-		if(!is_null($picture)) {
56
+		if (!is_null($picture)) {
57 57
 			$image = new \OC_Image();
58 58
 			$image->loadFromData($picture);
59 59
 
Please login to merge, or discard this patch.
lib/private/Preview/TXT.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
 			return null;
56 56
 		}
57 57
 
58
-		$content = stream_get_contents($content,3000);
58
+		$content = stream_get_contents($content, 3000);
59 59
 
60 60
 		//don't create previews of empty text files
61
-		if(trim($content) === '') {
61
+		if (trim($content) === '') {
62 62
 			return null;
63 63
 		}
64 64
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 		$canUseTTF = function_exists('imagettftext');
80 80
 
81
-		foreach($lines as $index => $line) {
81
+		foreach ($lines as $index => $line) {
82 82
 			$index = $index + 1;
83 83
 
84 84
 			$x = (int) 1;
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 				imagestring($image, 1, $x, $y, $line, $textColor);
92 92
 			}
93 93
 
94
-			if(($index * $lineSize) >= $maxY) {
94
+			if (($index * $lineSize) >= $maxY) {
95 95
 				break;
96 96
 			}
97 97
 		}
Please login to merge, or discard this patch.
lib/private/Preview/Office.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,20 +45,20 @@
 block discarded – undo
45 45
 
46 46
 		$tmpDir = \OC::$server->getTempManager()->getTempBaseDir();
47 47
 
48
-		$defaultParameters = ' -env:UserInstallation=file://' . escapeshellarg($tmpDir . '/owncloud-' . \OC_Util::getInstanceId() . '/') . ' --headless --nologo --nofirststartwizard --invisible --norestore --convert-to png --outdir ';
48
+		$defaultParameters = ' -env:UserInstallation=file://'.escapeshellarg($tmpDir.'/owncloud-'.\OC_Util::getInstanceId().'/').' --headless --nologo --nofirststartwizard --invisible --norestore --convert-to png --outdir ';
49 49
 		$clParameters = \OC::$server->getConfig()->getSystemValue('preview_office_cl_parameters', $defaultParameters);
50 50
 
51
-		$exec = $this->cmd . $clParameters . escapeshellarg($tmpDir) . ' ' . escapeshellarg($absPath);
51
+		$exec = $this->cmd.$clParameters.escapeshellarg($tmpDir).' '.escapeshellarg($absPath);
52 52
 
53 53
 		shell_exec($exec);
54 54
 
55 55
 		//create imagick object from png
56 56
 		$pngPreview = null;
57 57
 		try {
58
-			list($dirname, , , $filename) = array_values(pathinfo($absPath));
59
-			$pngPreview = $dirname . '/' . $filename . '.png';
58
+			list($dirname,,, $filename) = array_values(pathinfo($absPath));
59
+			$pngPreview = $dirname.'/'.$filename.'.png';
60 60
 
61
-			$png = new \imagick($pngPreview . '[0]');
61
+			$png = new \imagick($pngPreview.'[0]');
62 62
 			$png->setImageFormat('jpg');
63 63
 		} catch (\Exception $e) {
64 64
 			$this->cleanTmpFiles();
Please login to merge, or discard this patch.
lib/private/Preview/SVG.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
 			$content = stream_get_contents($file->fopen('r'));
48 48
 			if (substr($content, 0, 5) !== '<?xml') {
49
-				$content = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' . $content;
49
+				$content = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'.$content;
50 50
 			}
51 51
 
52 52
 			// Do not parse SVG files with references
Please login to merge, or discard this patch.
lib/private/Preview/HEIC.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 			$bp->setFormat('jpg');
60 60
 		} catch (\Exception $e) {
61 61
 			\OC::$server->getLogger()->logException($e, [
62
-				'message' => 'File: ' . $file->getPath() . ' Imagick says:',
62
+				'message' => 'File: '.$file->getPath().' Imagick says:',
63 63
 				'level' => ILogger::ERROR,
64 64
 				'app' => 'core',
65 65
 			]);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 		$bp = new \Imagick();
94 94
 
95 95
 		// Layer 0 contains either the bitmap or a flat representation of all vector layers
96
-		$bp->readImage($tmpPath . '[0]');
96
+		$bp->readImage($tmpPath.'[0]');
97 97
 
98 98
 		$bp->setImageFormat('jpg');
99 99
 
Please login to merge, or discard this patch.
lib/private/Preview/Bitmap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 			$bp = $this->getResizedPreview($tmpPath, $maxX, $maxY);
50 50
 		} catch (\Exception $e) {
51 51
 			\OC::$server->getLogger()->logException($e, [
52
-				'message' => 'File: ' . $file->getPath() . ' Imagick says:',
52
+				'message' => 'File: '.$file->getPath().' Imagick says:',
53 53
 				'level' => ILogger::ERROR,
54 54
 				'app' => 'core',
55 55
 			]);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		$bp = new Imagick();
84 84
 
85 85
 		// Layer 0 contains either the bitmap or a flat representation of all vector layers
86
-		$bp->readImage($tmpPath . '[0]');
86
+		$bp->readImage($tmpPath.'[0]');
87 87
 
88 88
 		$bp = $this->resize($bp, $maxX, $maxY);
89 89
 
Please login to merge, or discard this patch.