Passed
Push — master ( c6645c...a05176 )
by John
17:56 queued 13s
created
lib/private/Preview/TIFF.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@
 block discarded – undo
25 25
 
26 26
 //.tiff
27 27
 class TIFF extends Bitmap {
28
-	/**
29
-	 * {@inheritDoc}
30
-	 */
31
-	public function getMimeType(): string {
32
-		return '/image\/tiff/';
33
-	}
28
+    /**
29
+     * {@inheritDoc}
30
+     */
31
+    public function getMimeType(): string {
32
+        return '/image\/tiff/';
33
+    }
34 34
 }
Please login to merge, or discard this patch.
lib/private/Preview/BMP.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
 namespace OC\Preview;
24 24
 
25 25
 class BMP extends Image {
26
-	/**
27
-	 * {@inheritDoc}
28
-	 */
29
-	public function getMimeType(): string {
30
-		return '/image\/bmp/';
31
-	}
26
+    /**
27
+     * {@inheritDoc}
28
+     */
29
+    public function getMimeType(): string {
30
+        return '/image\/bmp/';
31
+    }
32 32
 }
Please login to merge, or discard this patch.
lib/private/Preview/Illustrator.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@
 block discarded – undo
25 25
 
26 26
 //.ai
27 27
 class Illustrator extends Bitmap {
28
-	/**
29
-	 * {@inheritDoc}
30
-	 */
31
-	public function getMimeType(): string {
32
-		return '/application\/illustrator/';
33
-	}
28
+    /**
29
+     * {@inheritDoc}
30
+     */
31
+    public function getMimeType(): string {
32
+        return '/application\/illustrator/';
33
+    }
34 34
 }
Please login to merge, or discard this patch.
lib/private/Preview/Postscript.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@
 block discarded – undo
25 25
 
26 26
 //.eps
27 27
 class Postscript extends Bitmap {
28
-	/**
29
-	 * {@inheritDoc}
30
-	 */
31
-	public function getMimeType(): string {
32
-		return '/application\/postscript/';
33
-	}
28
+    /**
29
+     * {@inheritDoc}
30
+     */
31
+    public function getMimeType(): string {
32
+        return '/application\/postscript/';
33
+    }
34 34
 }
Please login to merge, or discard this patch.
lib/private/Preview/GIF.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
 namespace OC\Preview;
24 24
 
25 25
 class GIF extends Image {
26
-	/**
27
-	 * {@inheritDoc}
28
-	 */
29
-	public function getMimeType(): string {
30
-		return '/image\/gif/';
31
-	}
26
+    /**
27
+     * {@inheritDoc}
28
+     */
29
+    public function getMimeType(): string {
30
+        return '/image\/gif/';
31
+    }
32 32
 }
Please login to merge, or discard this patch.
lib/private/Preview/SVG.php 2 patches
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.
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -32,50 +32,50 @@
 block discarded – undo
32 32
 use Psr\Log\LoggerInterface;
33 33
 
34 34
 class SVG extends ProviderV2 {
35
-	/**
36
-	 * {@inheritDoc}
37
-	 */
38
-	public function getMimeType(): string {
39
-		return '/image\/svg\+xml/';
40
-	}
35
+    /**
36
+     * {@inheritDoc}
37
+     */
38
+    public function getMimeType(): string {
39
+        return '/image\/svg\+xml/';
40
+    }
41 41
 
42
-	/**
43
-	 * {@inheritDoc}
44
-	 */
45
-	public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage {
46
-		try {
47
-			$svg = new \Imagick();
48
-			$svg->setBackgroundColor(new \ImagickPixel('transparent'));
42
+    /**
43
+     * {@inheritDoc}
44
+     */
45
+    public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage {
46
+        try {
47
+            $svg = new \Imagick();
48
+            $svg->setBackgroundColor(new \ImagickPixel('transparent'));
49 49
 
50
-			$content = stream_get_contents($file->fopen('r'));
51
-			if (substr($content, 0, 5) !== '<?xml') {
52
-				$content = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' . $content;
53
-			}
50
+            $content = stream_get_contents($file->fopen('r'));
51
+            if (substr($content, 0, 5) !== '<?xml') {
52
+                $content = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' . $content;
53
+            }
54 54
 
55
-			// Do not parse SVG files with references
56
-			if (stripos($content, 'xlink:href') !== false) {
57
-				return null;
58
-			}
55
+            // Do not parse SVG files with references
56
+            if (stripos($content, 'xlink:href') !== false) {
57
+                return null;
58
+            }
59 59
 
60
-			$svg->readImageBlob($content);
61
-			$svg->setImageFormat('png32');
62
-		} catch (\Exception $e) {
63
-			\OC::$server->get(LoggerInterface::class)->error($e->getMessage(), [
64
-				'exception' => $e,
65
-				'app' => 'core',
66
-			]);
67
-			return null;
68
-		}
60
+            $svg->readImageBlob($content);
61
+            $svg->setImageFormat('png32');
62
+        } catch (\Exception $e) {
63
+            \OC::$server->get(LoggerInterface::class)->error($e->getMessage(), [
64
+                'exception' => $e,
65
+                'app' => 'core',
66
+            ]);
67
+            return null;
68
+        }
69 69
 
70
-		//new image object
71
-		$image = new \OCP\Image();
72
-		$image->loadFromData((string) $svg);
73
-		//check if image object is valid
74
-		if ($image->valid()) {
75
-			$image->scaleDownToFit($maxX, $maxY);
70
+        //new image object
71
+        $image = new \OCP\Image();
72
+        $image->loadFromData((string) $svg);
73
+        //check if image object is valid
74
+        if ($image->valid()) {
75
+            $image->scaleDownToFit($maxX, $maxY);
76 76
 
77
-			return $image;
78
-		}
79
-		return null;
80
-	}
77
+            return $image;
78
+        }
79
+        return null;
80
+    }
81 81
 }
Please login to merge, or discard this patch.
lib/private/Preview/XBitmap.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
 namespace OC\Preview;
24 24
 
25 25
 class XBitmap extends Image {
26
-	/**
27
-	 * {@inheritDoc}
28
-	 */
29
-	public function getMimeType(): string {
30
-		return '/image\/x-xbitmap/';
31
-	}
26
+    /**
27
+     * {@inheritDoc}
28
+     */
29
+    public function getMimeType(): string {
30
+        return '/image\/x-xbitmap/';
31
+    }
32 32
 }
Please login to merge, or discard this patch.
lib/private/Preview/PNG.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
 namespace OC\Preview;
24 24
 
25 25
 class PNG extends Image {
26
-	/**
27
-	 * {@inheritDoc}
28
-	 */
29
-	public function getMimeType(): string {
30
-		return '/image\/png/';
31
-	}
26
+    /**
27
+     * {@inheritDoc}
28
+     */
29
+    public function getMimeType(): string {
30
+        return '/image\/png/';
31
+    }
32 32
 }
Please login to merge, or discard this patch.
lib/private/Preview/MSOffice2003.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
 
24 24
 //.docm, .dotm, .xls(m), .xlt(m), .xla(m), .ppt(m), .pot(m), .pps(m), .ppa(m)
25 25
 class MSOffice2003 extends Office {
26
-	/**
27
-	 * {@inheritDoc}
28
-	 */
29
-	public function getMimeType(): string {
30
-		return '/application\/vnd.ms-.*/';
31
-	}
26
+    /**
27
+     * {@inheritDoc}
28
+     */
29
+    public function getMimeType(): string {
30
+        return '/application\/vnd.ms-.*/';
31
+    }
32 32
 }
Please login to merge, or discard this patch.