Completed
Pull Request — master (#6812)
by Robin
15:25
created
lib/private/Files/Mount/CacheMountProvider.php 2 patches
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -31,42 +31,42 @@
 block discarded – undo
31 31
  * Mount provider for custom cache storages
32 32
  */
33 33
 class CacheMountProvider implements IMountProvider {
34
-	/**
35
-	 * @var IConfig
36
-	 */
37
-	private $config;
34
+    /**
35
+     * @var IConfig
36
+     */
37
+    private $config;
38 38
 
39
-	/**
40
-	 * ObjectStoreHomeMountProvider constructor.
41
-	 *
42
-	 * @param IConfig $config
43
-	 */
44
-	public function __construct(IConfig $config) {
45
-		$this->config = $config;
46
-	}
39
+    /**
40
+     * ObjectStoreHomeMountProvider constructor.
41
+     *
42
+     * @param IConfig $config
43
+     */
44
+    public function __construct(IConfig $config) {
45
+        $this->config = $config;
46
+    }
47 47
 
48
-	/**
49
-	 * Get the cache mount for a user
50
-	 *
51
-	 * @param IUser $user
52
-	 * @param IStorageFactory $loader
53
-	 * @return \OCP\Files\Mount\IMountPoint[]
54
-	 */
55
-	public function getMountsForUser(IUser $user, IStorageFactory $loader) {
56
-		$cacheBaseDir = $this->config->getSystemValue('cache_path', '');
57
-		if ($cacheBaseDir !== '') {
58
-			$cacheDir = rtrim($cacheBaseDir, '/') . '/' . $user->getUID();
59
-			if (!file_exists($cacheDir)) {
60
-				mkdir($cacheDir, 0770, true);
61
-				mkdir($cacheDir . '/uploads', 0770, true);
62
-			}
48
+    /**
49
+     * Get the cache mount for a user
50
+     *
51
+     * @param IUser $user
52
+     * @param IStorageFactory $loader
53
+     * @return \OCP\Files\Mount\IMountPoint[]
54
+     */
55
+    public function getMountsForUser(IUser $user, IStorageFactory $loader) {
56
+        $cacheBaseDir = $this->config->getSystemValue('cache_path', '');
57
+        if ($cacheBaseDir !== '') {
58
+            $cacheDir = rtrim($cacheBaseDir, '/') . '/' . $user->getUID();
59
+            if (!file_exists($cacheDir)) {
60
+                mkdir($cacheDir, 0770, true);
61
+                mkdir($cacheDir . '/uploads', 0770, true);
62
+            }
63 63
 
64
-			return [
65
-				new MountPoint('\OC\Files\Storage\Local', '/' . $user->getUID() . '/cache', ['datadir' => $cacheDir, $loader]),
66
-				new MountPoint('\OC\Files\Storage\Local', '/' . $user->getUID() . '/uploads', ['datadir' => $cacheDir . '/uploads', $loader])
67
-			];
68
-		} else {
69
-			return [];
70
-		}
71
-	}
64
+            return [
65
+                new MountPoint('\OC\Files\Storage\Local', '/' . $user->getUID() . '/cache', ['datadir' => $cacheDir, $loader]),
66
+                new MountPoint('\OC\Files\Storage\Local', '/' . $user->getUID() . '/uploads', ['datadir' => $cacheDir . '/uploads', $loader])
67
+            ];
68
+        } else {
69
+            return [];
70
+        }
71
+    }
72 72
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,15 +55,15 @@
 block discarded – undo
55 55
 	public function getMountsForUser(IUser $user, IStorageFactory $loader) {
56 56
 		$cacheBaseDir = $this->config->getSystemValue('cache_path', '');
57 57
 		if ($cacheBaseDir !== '') {
58
-			$cacheDir = rtrim($cacheBaseDir, '/') . '/' . $user->getUID();
58
+			$cacheDir = rtrim($cacheBaseDir, '/').'/'.$user->getUID();
59 59
 			if (!file_exists($cacheDir)) {
60 60
 				mkdir($cacheDir, 0770, true);
61
-				mkdir($cacheDir . '/uploads', 0770, true);
61
+				mkdir($cacheDir.'/uploads', 0770, true);
62 62
 			}
63 63
 
64 64
 			return [
65
-				new MountPoint('\OC\Files\Storage\Local', '/' . $user->getUID() . '/cache', ['datadir' => $cacheDir, $loader]),
66
-				new MountPoint('\OC\Files\Storage\Local', '/' . $user->getUID() . '/uploads', ['datadir' => $cacheDir . '/uploads', $loader])
65
+				new MountPoint('\OC\Files\Storage\Local', '/'.$user->getUID().'/cache', ['datadir' => $cacheDir, $loader]),
66
+				new MountPoint('\OC\Files\Storage\Local', '/'.$user->getUID().'/uploads', ['datadir' => $cacheDir.'/uploads', $loader])
67 67
 			];
68 68
 		} else {
69 69
 			return [];
Please login to merge, or discard this patch.