Completed
Push — stable13 ( 2d5d8b...1a016f )
by Roeland
17:00
created
lib/private/Preview/MarkDown.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
 namespace OC\Preview;
23 23
 
24 24
 class MarkDown extends TXT {
25
-	/**
26
-	 * {@inheritDoc}
27
-	 */
28
-	public function getMimeType() {
29
-		return '/text\/(x-)?markdown/';
30
-	}
25
+    /**
26
+     * {@inheritDoc}
27
+     */
28
+    public function getMimeType() {
29
+        return '/text\/(x-)?markdown/';
30
+    }
31 31
 
32 32
 }
Please login to merge, or discard this patch.
lib/private/Preview/JPEG.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 JPEG extends Image {
26
-	/**
27
-	 * {@inheritDoc}
28
-	 */
29
-	public function getMimeType() {
30
-		return '/image\/jpeg/';
31
-	}
26
+    /**
27
+     * {@inheritDoc}
28
+     */
29
+    public function getMimeType() {
30
+        return '/image\/jpeg/';
31
+    }
32 32
 }
Please login to merge, or discard this patch.
lib/private/Preview/StarOffice.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
 //.sxw, .stw, .sxc, .stc, .sxd, .std, .sxi, .sti, .sxg, .sxm
25 25
 class StarOffice extends Office {
26
-	/**
27
-	 * {@inheritDoc}
28
-	 */
29
-	public function getMimeType() {
30
-		return '/application\/vnd.sun.xml.*/';
31
-	}
26
+    /**
27
+     * {@inheritDoc}
28
+     */
29
+    public function getMimeType() {
30
+        return '/application\/vnd.sun.xml.*/';
31
+    }
32 32
 }
Please login to merge, or discard this patch.
lib/private/Preview/GeneratorHelper.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -35,58 +35,58 @@
 block discarded – undo
35 35
  */
36 36
 class GeneratorHelper {
37 37
 
38
-	/** @var IRootFolder */
39
-	private $rootFolder;
38
+    /** @var IRootFolder */
39
+    private $rootFolder;
40 40
 
41
-	public function __construct(IRootFolder $rootFolder) {
42
-		$this->rootFolder = $rootFolder;
43
-	}
41
+    public function __construct(IRootFolder $rootFolder) {
42
+        $this->rootFolder = $rootFolder;
43
+    }
44 44
 
45
-	/**
46
-	 * @param IProvider $provider
47
-	 * @param File $file
48
-	 * @param int $maxWidth
49
-	 * @param int $maxHeight
50
-	 * @return bool|IImage
51
-	 */
52
-	public function getThumbnail(IProvider $provider, File $file, $maxWidth, $maxHeight) {
53
-		list($view, $path) = $this->getViewAndPath($file);
54
-		return $provider->getThumbnail($path, $maxWidth, $maxHeight, false, $view);
55
-	}
45
+    /**
46
+     * @param IProvider $provider
47
+     * @param File $file
48
+     * @param int $maxWidth
49
+     * @param int $maxHeight
50
+     * @return bool|IImage
51
+     */
52
+    public function getThumbnail(IProvider $provider, File $file, $maxWidth, $maxHeight) {
53
+        list($view, $path) = $this->getViewAndPath($file);
54
+        return $provider->getThumbnail($path, $maxWidth, $maxHeight, false, $view);
55
+    }
56 56
 
57
-	/**
58
-	 * @param File $file
59
-	 * @return array
60
-	 * This is required to create the old view and path
61
-	 */
62
-	private function getViewAndPath(File $file) {
63
-		$absPath = ltrim($file->getPath(), '/');
64
-		$owner = explode('/', $absPath)[0];
57
+    /**
58
+     * @param File $file
59
+     * @return array
60
+     * This is required to create the old view and path
61
+     */
62
+    private function getViewAndPath(File $file) {
63
+        $absPath = ltrim($file->getPath(), '/');
64
+        $owner = explode('/', $absPath)[0];
65 65
 
66
-		$userFolder = $this->rootFolder->getUserFolder($owner)->getParent();
66
+        $userFolder = $this->rootFolder->getUserFolder($owner)->getParent();
67 67
 
68
-		$nodes = $userFolder->getById($file->getId());
69
-		$file = $nodes[0];
68
+        $nodes = $userFolder->getById($file->getId());
69
+        $file = $nodes[0];
70 70
 
71
-		$view = new View($userFolder->getPath());
72
-		$path = $userFolder->getRelativePath($file->getPath());
71
+        $view = new View($userFolder->getPath());
72
+        $path = $userFolder->getRelativePath($file->getPath());
73 73
 
74
-		return [$view, $path];
75
-	}
74
+        return [$view, $path];
75
+    }
76 76
 
77
-	/**
78
-	 * @param ISimpleFile $maxPreview
79
-	 * @return IImage
80
-	 */
81
-	public function getImage(ISimpleFile $maxPreview) {
82
-		return new img($maxPreview->getContent());
83
-	}
77
+    /**
78
+     * @param ISimpleFile $maxPreview
79
+     * @return IImage
80
+     */
81
+    public function getImage(ISimpleFile $maxPreview) {
82
+        return new img($maxPreview->getContent());
83
+    }
84 84
 
85
-	/**
86
-	 * @param $provider
87
-	 * @return IProvider
88
-	 */
89
-	public function getProvider($provider) {
90
-		return $provider();
91
-	}
85
+    /**
86
+     * @param $provider
87
+     * @return IProvider
88
+     */
89
+    public function getProvider($provider) {
90
+        return $provider();
91
+    }
92 92
 }
Please login to merge, or discard this patch.
lib/private/Preview/MSOfficeDoc.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
 //.doc, .dot
25 25
 class MSOfficeDoc extends Office {
26
-	/**
27
-	 * {@inheritDoc}
28
-	 */
29
-	public function getMimeType() {
30
-		return '/application\/msword/';
31
-	}
26
+    /**
27
+     * {@inheritDoc}
28
+     */
29
+    public function getMimeType() {
30
+        return '/application\/msword/';
31
+    }
32 32
 }
Please login to merge, or discard this patch.
lib/private/Preview/Font.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@
 block discarded – undo
24 24
 
25 25
 // .otf, .ttf and .pfb
26 26
 class Font extends Bitmap {
27
-	/**
28
-	 * {@inheritDoc}
29
-	 */
30
-	public function getMimeType() {
31
-		return '/application\/(?:font-sfnt|x-font$)/';
32
-	}
27
+    /**
28
+     * {@inheritDoc}
29
+     */
30
+    public function getMimeType() {
31
+        return '/application\/(?:font-sfnt|x-font$)/';
32
+    }
33 33
 }
34 34
\ No newline at end of file
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() {
32
-		return '/application\/postscript/';
33
-	}
28
+    /**
29
+     * {@inheritDoc}
30
+     */
31
+    public function getMimeType() {
32
+        return '/application\/postscript/';
33
+    }
34 34
 }
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
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
 			$content = stream_get_contents($fileview->fopen($path, 'r'));
44 44
 			if (substr($content, 0, 5) !== '<?xml') {
45
-				$content = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' . $content;
45
+				$content = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'.$content;
46 46
 			}
47 47
 
48 48
 			// Do not parse SVG files with references
Please login to merge, or discard this patch.
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -25,47 +25,47 @@
 block discarded – undo
25 25
 namespace OC\Preview;
26 26
 
27 27
 class SVG extends Provider {
28
-	/**
29
-	 * {@inheritDoc}
30
-	 */
31
-	public function getMimeType() {
32
-		return '/image\/svg\+xml/';
33
-	}
28
+    /**
29
+     * {@inheritDoc}
30
+     */
31
+    public function getMimeType() {
32
+        return '/image\/svg\+xml/';
33
+    }
34 34
 
35
-	/**
36
-	 * {@inheritDoc}
37
-	 */
38
-	public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {
39
-		try {
40
-			$svg = new \Imagick();
41
-			$svg->setBackgroundColor(new \ImagickPixel('transparent'));
35
+    /**
36
+     * {@inheritDoc}
37
+     */
38
+    public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {
39
+        try {
40
+            $svg = new \Imagick();
41
+            $svg->setBackgroundColor(new \ImagickPixel('transparent'));
42 42
 
43
-			$content = stream_get_contents($fileview->fopen($path, 'r'));
44
-			if (substr($content, 0, 5) !== '<?xml') {
45
-				$content = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' . $content;
46
-			}
43
+            $content = stream_get_contents($fileview->fopen($path, 'r'));
44
+            if (substr($content, 0, 5) !== '<?xml') {
45
+                $content = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' . $content;
46
+            }
47 47
 
48
-			// Do not parse SVG files with references
49
-			if (stripos($content, 'xlink:href') !== false) {
50
-				return false;
51
-			}
48
+            // Do not parse SVG files with references
49
+            if (stripos($content, 'xlink:href') !== false) {
50
+                return false;
51
+            }
52 52
 
53
-			$svg->readImageBlob($content);
54
-			$svg->setImageFormat('png32');
55
-		} catch (\Exception $e) {
56
-			\OCP\Util::writeLog('core', $e->getMessage(), \OCP\Util::ERROR);
57
-			return false;
58
-		}
53
+            $svg->readImageBlob($content);
54
+            $svg->setImageFormat('png32');
55
+        } catch (\Exception $e) {
56
+            \OCP\Util::writeLog('core', $e->getMessage(), \OCP\Util::ERROR);
57
+            return false;
58
+        }
59 59
 
60
-		//new image object
61
-		$image = new \OC_Image();
62
-		$image->loadFromData($svg);
63
-		//check if image object is valid
64
-		if ($image->valid()) {
65
-			$image->scaleDownToFit($maxX, $maxY);
60
+        //new image object
61
+        $image = new \OC_Image();
62
+        $image->loadFromData($svg);
63
+        //check if image object is valid
64
+        if ($image->valid()) {
65
+            $image->scaleDownToFit($maxX, $maxY);
66 66
 
67
-			return $image;
68
-		}
69
-		return false;
70
-	}
67
+            return $image;
68
+        }
69
+        return false;
70
+    }
71 71
 }
Please login to merge, or discard this patch.
lib/private/Share20/Hooks.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,15 +22,15 @@
 block discarded – undo
22 22
 namespace OC\Share20;
23 23
 
24 24
 class Hooks {
25
-	public static function post_deleteUser($arguments) {
26
-		\OC::$server->getShareManager()->userDeleted($arguments['uid']);
27
-	}
25
+    public static function post_deleteUser($arguments) {
26
+        \OC::$server->getShareManager()->userDeleted($arguments['uid']);
27
+    }
28 28
 
29
-	public static function post_deleteGroup($arguments) {
30
-		\OC::$server->getShareManager()->groupDeleted($arguments['gid']);
31
-	}
29
+    public static function post_deleteGroup($arguments) {
30
+        \OC::$server->getShareManager()->groupDeleted($arguments['gid']);
31
+    }
32 32
 
33
-	public static function post_removeFromGroup($arguments) {
34
-		\OC::$server->getShareManager()->userDeletedFromGroup($arguments['uid'], $arguments['gid']);
35
-	}
33
+    public static function post_removeFromGroup($arguments) {
34
+        \OC::$server->getShareManager()->userDeletedFromGroup($arguments['uid'], $arguments['gid']);
35
+    }
36 36
 }
Please login to merge, or discard this patch.