Completed
Push — master ( e35451...cc9073 )
by Morris
53:33 queued 20:44
created
lib/private/Files/Config/MountProviderCollection.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
 	 */
78 78
 	public function getMountsForUser(IUser $user) {
79 79
 		$loader = $this->loader;
80
-		$mounts = array_map(function (IMountProvider $provider) use ($user, $loader) {
80
+		$mounts = array_map(function(IMountProvider $provider) use ($user, $loader) {
81 81
 			return $provider->getMountsForUser($user, $loader);
82 82
 		}, $this->providers);
83
-		$mounts = array_filter($mounts, function ($result) {
83
+		$mounts = array_filter($mounts, function($result) {
84 84
 			return is_array($result);
85 85
 		});
86
-		$mounts = array_reduce($mounts, function (array $mounts, array $providerMounts) {
86
+		$mounts = array_reduce($mounts, function(array $mounts, array $providerMounts) {
87 87
 			return array_merge($mounts, $providerMounts);
88 88
 		}, array());
89 89
 		return $this->filterMounts($user, $mounts);
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
 		// shared mount provider gets to go last since it needs to know existing files
94 94
 		// to check for name collisions
95 95
 		$firstMounts = [];
96
-		$firstProviders = array_filter($this->providers, function (IMountProvider $provider) {
96
+		$firstProviders = array_filter($this->providers, function(IMountProvider $provider) {
97 97
 			return (get_class($provider) !== 'OCA\Files_Sharing\MountProvider');
98 98
 		});
99
-		$lastProviders = array_filter($this->providers, function (IMountProvider $provider) {
99
+		$lastProviders = array_filter($this->providers, function(IMountProvider $provider) {
100 100
 			return (get_class($provider) === 'OCA\Files_Sharing\MountProvider');
101 101
 		});
102 102
 		foreach ($firstProviders as $provider) {
@@ -134,11 +134,11 @@  discard block
 block discarded – undo
134 134
 		$providers = array_reverse($this->homeProviders); // call the latest registered provider first to give apps an opportunity to overwrite builtin
135 135
 		foreach ($providers as $homeProvider) {
136 136
 			if ($mount = $homeProvider->getHomeMountForUser($user, $this->loader)) {
137
-				$mount->setMountPoint('/' . $user->getUID()); //make sure the mountpoint is what we expect
137
+				$mount->setMountPoint('/'.$user->getUID()); //make sure the mountpoint is what we expect
138 138
 				return $mount;
139 139
 			}
140 140
 		}
141
-		throw new \Exception('No home storage configured for user ' . $user);
141
+		throw new \Exception('No home storage configured for user '.$user);
142 142
 	}
143 143
 
144 144
 	/**
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	}
158 158
 
159 159
 	private function filterMounts(IUser $user, array $mountPoints) {
160
-		return array_filter($mountPoints, function (IMountPoint $mountPoint) use ($user) {
160
+		return array_filter($mountPoints, function(IMountPoint $mountPoint) use ($user) {
161 161
 			foreach ($this->mountFilters as $filter) {
162 162
 				if ($filter($mountPoint, $user) === false) {
163 163
 					return false;
Please login to merge, or discard this patch.