Completed
Pull Request — master (#9345)
by Björn
22:56
created
ocm-provider/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
  */
21 21
 
22 22
 
23
-require_once __DIR__ . '/../lib/base.php';
23
+require_once __DIR__.'/../lib/base.php';
24 24
 
25 25
 header('Content-Type: application/json');
26 26
 
Please login to merge, or discard this patch.
apps/federatedfilesharing/composer/composer/autoload_static.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -6,39 +6,39 @@
 block discarded – undo
6 6
 
7 7
 class ComposerStaticInitFederatedFileSharing
8 8
 {
9
-    public static $prefixLengthsPsr4 = array (
9
+    public static $prefixLengthsPsr4 = array(
10 10
         'O' => 
11
-        array (
11
+        array(
12 12
             'OCA\\FederatedFileSharing\\' => 25,
13 13
         ),
14 14
     );
15 15
 
16
-    public static $prefixDirsPsr4 = array (
16
+    public static $prefixDirsPsr4 = array(
17 17
         'OCA\\FederatedFileSharing\\' => 
18
-        array (
19
-            0 => __DIR__ . '/..' . '/../lib',
18
+        array(
19
+            0 => __DIR__.'/..'.'/../lib',
20 20
         ),
21 21
     );
22 22
 
23
-    public static $classMap = array (
24
-        'OCA\\FederatedFileSharing\\AddressHandler' => __DIR__ . '/..' . '/../lib/AddressHandler.php',
25
-        'OCA\\FederatedFileSharing\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
26
-        'OCA\\FederatedFileSharing\\BackgroundJob\\RetryJob' => __DIR__ . '/..' . '/../lib/BackgroundJob/RetryJob.php',
27
-        'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => __DIR__ . '/..' . '/../lib/Controller/MountPublicLinkController.php',
28
-        'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => __DIR__ . '/..' . '/../lib/Controller/RequestHandlerController.php',
29
-        'OCA\\FederatedFileSharing\\FederatedShareProvider' => __DIR__ . '/..' . '/../lib/FederatedShareProvider.php',
30
-        'OCA\\FederatedFileSharing\\Notifications' => __DIR__ . '/..' . '/../lib/Notifications.php',
31
-        'OCA\\FederatedFileSharing\\Notifier' => __DIR__ . '/..' . '/../lib/Notifier.php',
32
-        'OCA\\FederatedFileSharing\\OCM\\CloudFederationProviderFiles' => __DIR__ . '/..' . '/../lib/ocm/CloudFederationProviderFiles.php',
33
-        'OCA\\FederatedFileSharing\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php',
34
-        'OCA\\FederatedFileSharing\\Settings\\Personal' => __DIR__ . '/..' . '/../lib/Settings/Personal.php',
35
-        'OCA\\FederatedFileSharing\\Settings\\PersonalSection' => __DIR__ . '/..' . '/../lib/Settings/PersonalSection.php',
36
-        'OCA\\FederatedFileSharing\\TokenHandler' => __DIR__ . '/..' . '/../lib/TokenHandler.php',
23
+    public static $classMap = array(
24
+        'OCA\\FederatedFileSharing\\AddressHandler' => __DIR__.'/..'.'/../lib/AddressHandler.php',
25
+        'OCA\\FederatedFileSharing\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php',
26
+        'OCA\\FederatedFileSharing\\BackgroundJob\\RetryJob' => __DIR__.'/..'.'/../lib/BackgroundJob/RetryJob.php',
27
+        'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => __DIR__.'/..'.'/../lib/Controller/MountPublicLinkController.php',
28
+        'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => __DIR__.'/..'.'/../lib/Controller/RequestHandlerController.php',
29
+        'OCA\\FederatedFileSharing\\FederatedShareProvider' => __DIR__.'/..'.'/../lib/FederatedShareProvider.php',
30
+        'OCA\\FederatedFileSharing\\Notifications' => __DIR__.'/..'.'/../lib/Notifications.php',
31
+        'OCA\\FederatedFileSharing\\Notifier' => __DIR__.'/..'.'/../lib/Notifier.php',
32
+        'OCA\\FederatedFileSharing\\OCM\\CloudFederationProviderFiles' => __DIR__.'/..'.'/../lib/ocm/CloudFederationProviderFiles.php',
33
+        'OCA\\FederatedFileSharing\\Settings\\Admin' => __DIR__.'/..'.'/../lib/Settings/Admin.php',
34
+        'OCA\\FederatedFileSharing\\Settings\\Personal' => __DIR__.'/..'.'/../lib/Settings/Personal.php',
35
+        'OCA\\FederatedFileSharing\\Settings\\PersonalSection' => __DIR__.'/..'.'/../lib/Settings/PersonalSection.php',
36
+        'OCA\\FederatedFileSharing\\TokenHandler' => __DIR__.'/..'.'/../lib/TokenHandler.php',
37 37
     );
38 38
 
39 39
     public static function getInitializer(ClassLoader $loader)
40 40
     {
41
-        return \Closure::bind(function () use ($loader) {
41
+        return \Closure::bind(function() use ($loader) {
42 42
             $loader->prefixLengthsPsr4 = ComposerStaticInitFederatedFileSharing::$prefixLengthsPsr4;
43 43
             $loader->prefixDirsPsr4 = ComposerStaticInitFederatedFileSharing::$prefixDirsPsr4;
44 44
             $loader->classMap = ComposerStaticInitFederatedFileSharing::$classMap;
Please login to merge, or discard this patch.
apps/federatedfilesharing/composer/composer/autoload_classmap.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@
 block discarded – undo
6 6
 $baseDir = $vendorDir;
7 7
 
8 8
 return array(
9
-    'OCA\\FederatedFileSharing\\AddressHandler' => $baseDir . '/../lib/AddressHandler.php',
10
-    'OCA\\FederatedFileSharing\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
11
-    'OCA\\FederatedFileSharing\\BackgroundJob\\RetryJob' => $baseDir . '/../lib/BackgroundJob/RetryJob.php',
12
-    'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => $baseDir . '/../lib/Controller/MountPublicLinkController.php',
13
-    'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => $baseDir . '/../lib/Controller/RequestHandlerController.php',
14
-    'OCA\\FederatedFileSharing\\FederatedShareProvider' => $baseDir . '/../lib/FederatedShareProvider.php',
15
-    'OCA\\FederatedFileSharing\\Notifications' => $baseDir . '/../lib/Notifications.php',
16
-    'OCA\\FederatedFileSharing\\Notifier' => $baseDir . '/../lib/Notifier.php',
17
-    'OCA\\FederatedFileSharing\\OCM\\CloudFederationProviderFiles' => $baseDir . '/../lib/ocm/CloudFederationProviderFiles.php',
18
-    'OCA\\FederatedFileSharing\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php',
19
-    'OCA\\FederatedFileSharing\\Settings\\Personal' => $baseDir . '/../lib/Settings/Personal.php',
20
-    'OCA\\FederatedFileSharing\\Settings\\PersonalSection' => $baseDir . '/../lib/Settings/PersonalSection.php',
21
-    'OCA\\FederatedFileSharing\\TokenHandler' => $baseDir . '/../lib/TokenHandler.php',
9
+    'OCA\\FederatedFileSharing\\AddressHandler' => $baseDir.'/../lib/AddressHandler.php',
10
+    'OCA\\FederatedFileSharing\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php',
11
+    'OCA\\FederatedFileSharing\\BackgroundJob\\RetryJob' => $baseDir.'/../lib/BackgroundJob/RetryJob.php',
12
+    'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => $baseDir.'/../lib/Controller/MountPublicLinkController.php',
13
+    'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => $baseDir.'/../lib/Controller/RequestHandlerController.php',
14
+    'OCA\\FederatedFileSharing\\FederatedShareProvider' => $baseDir.'/../lib/FederatedShareProvider.php',
15
+    'OCA\\FederatedFileSharing\\Notifications' => $baseDir.'/../lib/Notifications.php',
16
+    'OCA\\FederatedFileSharing\\Notifier' => $baseDir.'/../lib/Notifier.php',
17
+    'OCA\\FederatedFileSharing\\OCM\\CloudFederationProviderFiles' => $baseDir.'/../lib/ocm/CloudFederationProviderFiles.php',
18
+    'OCA\\FederatedFileSharing\\Settings\\Admin' => $baseDir.'/../lib/Settings/Admin.php',
19
+    'OCA\\FederatedFileSharing\\Settings\\Personal' => $baseDir.'/../lib/Settings/Personal.php',
20
+    'OCA\\FederatedFileSharing\\Settings\\PersonalSection' => $baseDir.'/../lib/Settings/PersonalSection.php',
21
+    'OCA\\FederatedFileSharing\\TokenHandler' => $baseDir.'/../lib/TokenHandler.php',
22 22
 );
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -165,16 +165,16 @@  discard block
 block discarded – undo
165 165
 			}
166 166
 
167 167
 			// FIXME this should be a method in the user management instead
168
-			$this->logger->debug('shareWith before, ' . $shareWith, ['app' => 'files_sharing']);
168
+			$this->logger->debug('shareWith before, '.$shareWith, ['app' => 'files_sharing']);
169 169
 			\OCP\Util::emitHook(
170 170
 				'\OCA\Files_Sharing\API\Server2Server',
171 171
 				'preLoginNameUsedAsUserName',
172 172
 				array('uid' => &$shareWith)
173 173
 			);
174
-			$this->logger->debug('shareWith after, ' . $shareWith, ['app' => 'files_sharing']);
174
+			$this->logger->debug('shareWith after, '.$shareWith, ['app' => 'files_sharing']);
175 175
 
176 176
 			if (!$this->userManager->userExists($shareWith)) {
177
-				throw new ProviderCouldNotAddShareException('User does not exists', '',Http::STATUS_BAD_REQUEST);
177
+				throw new ProviderCouldNotAddShareException('User does not exists', '', Http::STATUS_BAD_REQUEST);
178 178
 			}
179 179
 
180 180
 			\OC_Util::setupFS($shareWith);
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 					->setType('remote_share')
199 199
 					->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_RECEIVED, [$ownerFederatedId, trim($name, '/')])
200 200
 					->setAffectedUser($shareWith)
201
-					->setObject('remote_share', (int)$shareId, $name);
201
+					->setObject('remote_share', (int) $shareId, $name);
202 202
 				\OC::$server->getActivityManager()->publish($event);
203 203
 
204 204
 				$notification = $this->notificationManager->createNotification();
@@ -210,12 +210,12 @@  discard block
 block discarded – undo
210 210
 
211 211
 				$declineAction = $notification->createAction();
212 212
 				$declineAction->setLabel('decline')
213
-					->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/' . $shareId)), 'DELETE');
213
+					->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/'.$shareId)), 'DELETE');
214 214
 				$notification->addAction($declineAction);
215 215
 
216 216
 				$acceptAction = $notification->createAction();
217 217
 				$acceptAction->setLabel('accept')
218
-					->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/' . $shareId)), 'POST');
218
+					->setLink($this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkTo('', 'ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/'.$shareId)), 'POST');
219 219
 				$notification->addAction($acceptAction);
220 220
 
221 221
 				$this->notificationManager->notify($notification);
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 					'level' => \OCP\Util::ERROR,
228 228
 					'app' => 'files_sharing'
229 229
 				]);
230
-				throw new ProviderCouldNotAddShareException('internal server error, was not able to add share from ' . $remote, '', HTTP::STATUS_INTERNAL_SERVER_ERROR);
230
+				throw new ProviderCouldNotAddShareException('internal server error, was not able to add share from '.$remote, '', HTTP::STATUS_INTERNAL_SERVER_ERROR);
231 231
 			}
232 232
 		}
233 233
 
Please login to merge, or discard this patch.
apps/federatedfilesharing/lib/Controller/RequestHandlerController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 		$owner = isset($_POST['owner']) ? $_POST['owner'] : null;
149 149
 		$sharedBy = isset($_POST['sharedBy']) ? $_POST['sharedBy'] : null;
150 150
 		$shareWith = isset($_POST['shareWith']) ? $_POST['shareWith'] : null;
151
-		$remoteId = isset($_POST['remoteId']) ? (int)$_POST['remoteId'] : null;
151
+		$remoteId = isset($_POST['remoteId']) ? (int) $_POST['remoteId'] : null;
152 152
 		$sharedByFederatedId = isset($_POST['sharedByFederatedId']) ? $_POST['sharedByFederatedId'] : null;
153 153
 		$ownerFederatedId = isset($_POST['ownerFederatedId']) ? $_POST['ownerFederatedId'] : null;
154 154
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 		} catch (ProviderCouldNotAddShareException $e) {
184 184
 			throw new OCSException($e->getMessage(), $e->getCode());
185 185
 		} catch (\Exception $e) {
186
-			throw new OCSException('internal server error, was not able to add share from ' . $remote, 500);
186
+			throw new OCSException('internal server error, was not able to add share from '.$remote, 500);
187 187
 		}
188 188
 
189 189
 		return new Http\DataResponse();
@@ -205,8 +205,8 @@  discard block
 block discarded – undo
205 205
 
206 206
 		$token = $this->request->getParam('token', null);
207 207
 		$shareWith = $this->request->getParam('shareWith', null);
208
-		$permission = (int)$this->request->getParam('permission', null);
209
-		$remoteId = (int)$this->request->getParam('remoteId', null);
208
+		$permission = (int) $this->request->getParam('permission', null);
209
+		$remoteId = (int) $this->request->getParam('remoteId', null);
210 210
 
211 211
 		if ($id === null ||
212 212
 			$token === null ||
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 				$share->setSharedWith($shareWith);
242 242
 				try {
243 243
 					$result = $this->federatedShareProvider->create($share);
244
-					$this->federatedShareProvider->storeRemoteId((int)$result->getId(), $remoteId);
244
+					$this->federatedShareProvider->storeRemoteId((int) $result->getId(), $remoteId);
245 245
 					return new Http\DataResponse([
246 246
 						'token' => $result->getToken(),
247 247
 						'remoteId' => $result->getId()
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
 			$notification = $notificationManager->createNotification();
440 440
 			$notification->setApp('files_sharing')
441 441
 				->setUser($share['user'])
442
-				->setObject('remote_share', (int)$share['id']);
442
+				->setObject('remote_share', (int) $share['id']);
443 443
 			$notificationManager->markProcessed($notification);
444 444
 
445 445
 			$event = \OC::$server->getActivityManager()->generateEvent();
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 				->setType('remote_share')
448 448
 				->setSubject(RemoteShares::SUBJECT_REMOTE_SHARE_UNSHARED, [$owner->getId(), $path])
449 449
 				->setAffectedUser($user)
450
-				->setObject('remote_share', (int)$share['id'], $path);
450
+				->setObject('remote_share', (int) $share['id'], $path);
451 451
 			\OC::$server->getActivityManager()->publish($event);
452 452
 		}
453 453
 
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
 		$validPermission = ctype_digit($permissions);
590 590
 		$validToken = $this->verifyShare($share, $token);
591 591
 		if ($validPermission && $validToken) {
592
-			$this->updatePermissionsInDatabase($share, (int)$permissions);
592
+			$this->updatePermissionsInDatabase($share, (int) $permissions);
593 593
 		} else {
594 594
 			throw new OCSBadRequestException();
595 595
 		}
Please login to merge, or discard this patch.
apps/cloud_federation_api/lib/Controller/RequestHandlerController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
 		if (!$this->userManager->userExists($shareWith)) {
139 139
 			return new JSONResponse(
140
-				['message' => 'User "' . $shareWith . '" does not exists at ' . $this->urlGenerator->getBaseUrl()],
140
+				['message' => 'User "'.$shareWith.'" does not exists at '.$this->urlGenerator->getBaseUrl()],
141 141
 				Http::STATUS_BAD_REQUEST
142 142
 			);
143 143
 		}
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 			);
169 169
 		} catch (\Exception $e) {
170 170
 			return new JSONResponse(
171
-				['message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl()],
171
+				['message' => 'Internal error at '.$this->urlGenerator->getBaseUrl()],
172 172
 				Http::STATUS_BAD_REQUEST
173 173
 			);
174 174
 		}
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 			);
223 223
 		} catch (\Exception $e) {
224 224
 			return new JSONResponse(
225
-				['message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl()],
225
+				['message' => 'Internal error at '.$this->urlGenerator->getBaseUrl()],
226 226
 				Http::STATUS_BAD_REQUEST
227 227
 			);
228 228
 		}
@@ -244,13 +244,13 @@  discard block
 block discarded – undo
244 244
 	private function mapUid($uid) {
245 245
 		\OC::$server->getURLGenerator()->linkToDocs('key');
246 246
 		// FIXME this should be a method in the user management instead
247
-		$this->logger->debug('shareWith before, ' . $uid, ['app' => $this->appName]);
247
+		$this->logger->debug('shareWith before, '.$uid, ['app' => $this->appName]);
248 248
 		\OCP\Util::emitHook(
249 249
 			'\OCA\Files_Sharing\API\Server2Server',
250 250
 			'preLoginNameUsedAsUserName',
251 251
 			array('uid' => &$uid)
252 252
 		);
253
-		$this->logger->debug('shareWith after, ' . $uid, ['app' => $this->appName]);
253
+		$this->logger->debug('shareWith after, '.$uid, ['app' => $this->appName]);
254 254
 
255 255
 		return $uid;
256 256
 	}
Please login to merge, or discard this patch.
lib/public/Federation/Exceptions/ProviderDoesNotExistsException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 	 */
33 33
 	public function __construct($providerId) {
34 34
 		$l = \OC::$server->getL10N('federation');
35
-		$message = 'Cloud Federation Provider with ID: "' . $providerId . '" does not exist.';
35
+		$message = 'Cloud Federation Provider with ID: "'.$providerId.'" does not exist.';
36 36
 		$hint = $l->t('Cloud Federation Provider with ID: "%s" does not exist.', [$providerId]);
37 37
 		parent::__construct($message, $hint);
38 38
 	}
Please login to merge, or discard this patch.
lib/public/Federation/Exceptions/ProviderAlreadyExistsException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 	 */
34 34
 	public function __construct($newProviderId, $existingProviderName) {
35 35
 		$l = \OC::$server->getL10N('federation');
36
-		$message = 'Id "' . $newProviderId . '" already used by cloud federation provider "' . $existingProviderName . '"';
36
+		$message = 'Id "'.$newProviderId.'" already used by cloud federation provider "'.$existingProviderName.'"';
37 37
 		$hint = $l->t('Id "%s" already used by cloud federation provider "%s"', [$newProviderId, $existingProviderName]);
38 38
 		parent::__construct($message, $hint);
39 39
 	}
Please login to merge, or discard this patch.
lib/private/Server.php 1 patch
Spacing   +116 added lines, -116 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 		parent::__construct();
168 168
 		$this->webRoot = $webRoot;
169 169
 
170
-		$this->registerService(\OCP\IServerContainer::class, function (IServerContainer $c) {
170
+		$this->registerService(\OCP\IServerContainer::class, function(IServerContainer $c) {
171 171
 			return $c;
172 172
 		});
173 173
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 		$this->registerAlias(IActionFactory::class, ActionFactory::class);
181 181
 
182 182
 
183
-		$this->registerService(\OCP\IPreview::class, function (Server $c) {
183
+		$this->registerService(\OCP\IPreview::class, function(Server $c) {
184 184
 			return new PreviewManager(
185 185
 				$c->getConfig(),
186 186
 				$c->getRootFolder(),
@@ -191,13 +191,13 @@  discard block
 block discarded – undo
191 191
 		});
192 192
 		$this->registerAlias('PreviewManager', \OCP\IPreview::class);
193 193
 
194
-		$this->registerService(\OC\Preview\Watcher::class, function (Server $c) {
194
+		$this->registerService(\OC\Preview\Watcher::class, function(Server $c) {
195 195
 			return new \OC\Preview\Watcher(
196 196
 				$c->getAppDataDir('preview')
197 197
 			);
198 198
 		});
199 199
 
200
-		$this->registerService('EncryptionManager', function (Server $c) {
200
+		$this->registerService('EncryptionManager', function(Server $c) {
201 201
 			$view = new View();
202 202
 			$util = new Encryption\Util(
203 203
 				$view,
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 			);
216 216
 		});
217 217
 
218
-		$this->registerService('EncryptionFileHelper', function (Server $c) {
218
+		$this->registerService('EncryptionFileHelper', function(Server $c) {
219 219
 			$util = new Encryption\Util(
220 220
 				new View(),
221 221
 				$c->getUserManager(),
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 			);
230 230
 		});
231 231
 
232
-		$this->registerService('EncryptionKeyStorage', function (Server $c) {
232
+		$this->registerService('EncryptionKeyStorage', function(Server $c) {
233 233
 			$view = new View();
234 234
 			$util = new Encryption\Util(
235 235
 				$view,
@@ -240,30 +240,30 @@  discard block
 block discarded – undo
240 240
 
241 241
 			return new Encryption\Keys\Storage($view, $util);
242 242
 		});
243
-		$this->registerService('TagMapper', function (Server $c) {
243
+		$this->registerService('TagMapper', function(Server $c) {
244 244
 			return new TagMapper($c->getDatabaseConnection());
245 245
 		});
246 246
 
247
-		$this->registerService(\OCP\ITagManager::class, function (Server $c) {
247
+		$this->registerService(\OCP\ITagManager::class, function(Server $c) {
248 248
 			$tagMapper = $c->query('TagMapper');
249 249
 			return new TagManager($tagMapper, $c->getUserSession());
250 250
 		});
251 251
 		$this->registerAlias('TagManager', \OCP\ITagManager::class);
252 252
 
253
-		$this->registerService('SystemTagManagerFactory', function (Server $c) {
253
+		$this->registerService('SystemTagManagerFactory', function(Server $c) {
254 254
 			$config = $c->getConfig();
255 255
 			$factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class);
256 256
 			return new $factoryClass($this);
257 257
 		});
258
-		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) {
258
+		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) {
259 259
 			return $c->query('SystemTagManagerFactory')->getManager();
260 260
 		});
261 261
 		$this->registerAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class);
262 262
 
263
-		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) {
263
+		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) {
264 264
 			return $c->query('SystemTagManagerFactory')->getObjectMapper();
265 265
 		});
266
-		$this->registerService('RootFolder', function (Server $c) {
266
+		$this->registerService('RootFolder', function(Server $c) {
267 267
 			$manager = \OC\Files\Filesystem::getMountManager(null);
268 268
 			$view = new View();
269 269
 			$root = new Root(
@@ -284,38 +284,38 @@  discard block
 block discarded – undo
284 284
 		});
285 285
 		$this->registerAlias('SystemTagObjectMapper', \OCP\SystemTag\ISystemTagObjectMapper::class);
286 286
 
287
-		$this->registerService(\OCP\Files\IRootFolder::class, function (Server $c) {
288
-			return new LazyRoot(function () use ($c) {
287
+		$this->registerService(\OCP\Files\IRootFolder::class, function(Server $c) {
288
+			return new LazyRoot(function() use ($c) {
289 289
 				return $c->query('RootFolder');
290 290
 			});
291 291
 		});
292 292
 		$this->registerAlias('LazyRootFolder', \OCP\Files\IRootFolder::class);
293 293
 
294
-		$this->registerService(\OC\User\Manager::class, function (Server $c) {
294
+		$this->registerService(\OC\User\Manager::class, function(Server $c) {
295 295
 			$config = $c->getConfig();
296 296
 			return new \OC\User\Manager($config);
297 297
 		});
298 298
 		$this->registerAlias('UserManager', \OC\User\Manager::class);
299 299
 		$this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class);
300 300
 
301
-		$this->registerService(\OCP\IGroupManager::class, function (Server $c) {
301
+		$this->registerService(\OCP\IGroupManager::class, function(Server $c) {
302 302
 			$groupManager = new \OC\Group\Manager($this->getUserManager(), $this->getLogger());
303
-			$groupManager->listen('\OC\Group', 'preCreate', function ($gid) {
303
+			$groupManager->listen('\OC\Group', 'preCreate', function($gid) {
304 304
 				\OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid));
305 305
 			});
306
-			$groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $gid) {
306
+			$groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $gid) {
307 307
 				\OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $gid->getGID()));
308 308
 			});
309
-			$groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) {
309
+			$groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) {
310 310
 				\OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID()));
311 311
 			});
312
-			$groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) {
312
+			$groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) {
313 313
 				\OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID()));
314 314
 			});
315
-			$groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
315
+			$groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
316 316
 				\OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID()));
317 317
 			});
318
-			$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
318
+			$groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
319 319
 				\OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
320 320
 				//Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks
321 321
 				\OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 		});
325 325
 		$this->registerAlias('GroupManager', \OCP\IGroupManager::class);
326 326
 
327
-		$this->registerService(Store::class, function (Server $c) {
327
+		$this->registerService(Store::class, function(Server $c) {
328 328
 			$session = $c->getSession();
329 329
 			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
330 330
 				$tokenProvider = $c->query(IProvider::class);
@@ -335,11 +335,11 @@  discard block
 block discarded – undo
335 335
 			return new Store($session, $logger, $tokenProvider);
336 336
 		});
337 337
 		$this->registerAlias(IStore::class, Store::class);
338
-		$this->registerService(Authentication\Token\DefaultTokenMapper::class, function (Server $c) {
338
+		$this->registerService(Authentication\Token\DefaultTokenMapper::class, function(Server $c) {
339 339
 			$dbConnection = $c->getDatabaseConnection();
340 340
 			return new Authentication\Token\DefaultTokenMapper($dbConnection);
341 341
 		});
342
-		$this->registerService(Authentication\Token\DefaultTokenProvider::class, function (Server $c) {
342
+		$this->registerService(Authentication\Token\DefaultTokenProvider::class, function(Server $c) {
343 343
 			$mapper = $c->query(Authentication\Token\DefaultTokenMapper::class);
344 344
 			$crypto = $c->getCrypto();
345 345
 			$config = $c->getConfig();
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 		});
350 350
 		$this->registerAlias(IProvider::class, Authentication\Token\DefaultTokenProvider::class);
351 351
 
352
-		$this->registerService(\OCP\IUserSession::class, function (Server $c) {
352
+		$this->registerService(\OCP\IUserSession::class, function(Server $c) {
353 353
 			$manager = $c->getUserManager();
354 354
 			$session = new \OC\Session\Memory('');
355 355
 			$timeFactory = new TimeFactory();
@@ -373,45 +373,45 @@  discard block
 block discarded – undo
373 373
 				$c->getLockdownManager(),
374 374
 				$c->getLogger()
375 375
 			);
376
-			$userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) {
376
+			$userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) {
377 377
 				\OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password));
378 378
 			});
379
-			$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
379
+			$userSession->listen('\OC\User', 'postCreateUser', function($user, $password) {
380 380
 				/** @var $user \OC\User\User */
381 381
 				\OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password));
382 382
 			});
383
-			$userSession->listen('\OC\User', 'preDelete', function ($user) use ($dispatcher) {
383
+			$userSession->listen('\OC\User', 'preDelete', function($user) use ($dispatcher) {
384 384
 				/** @var $user \OC\User\User */
385 385
 				\OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID()));
386 386
 				$dispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user));
387 387
 			});
388
-			$userSession->listen('\OC\User', 'postDelete', function ($user) {
388
+			$userSession->listen('\OC\User', 'postDelete', function($user) {
389 389
 				/** @var $user \OC\User\User */
390 390
 				\OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID()));
391 391
 			});
392
-			$userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) {
392
+			$userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) {
393 393
 				/** @var $user \OC\User\User */
394 394
 				\OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
395 395
 			});
396
-			$userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) {
396
+			$userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) {
397 397
 				/** @var $user \OC\User\User */
398 398
 				\OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
399 399
 			});
400
-			$userSession->listen('\OC\User', 'preLogin', function ($uid, $password) {
400
+			$userSession->listen('\OC\User', 'preLogin', function($uid, $password) {
401 401
 				\OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password));
402 402
 			});
403
-			$userSession->listen('\OC\User', 'postLogin', function ($user, $password) {
403
+			$userSession->listen('\OC\User', 'postLogin', function($user, $password) {
404 404
 				/** @var $user \OC\User\User */
405 405
 				\OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password));
406 406
 			});
407
-			$userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) {
407
+			$userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) {
408 408
 				/** @var $user \OC\User\User */
409 409
 				\OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password));
410 410
 			});
411
-			$userSession->listen('\OC\User', 'logout', function () {
411
+			$userSession->listen('\OC\User', 'logout', function() {
412 412
 				\OC_Hook::emit('OC_User', 'logout', array());
413 413
 			});
414
-			$userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) use ($dispatcher) {
414
+			$userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) use ($dispatcher) {
415 415
 				/** @var $user \OC\User\User */
416 416
 				\OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue));
417 417
 				$dispatcher->dispatch('OCP\IUser::changeUser', new GenericEvent($user, ['feature' => $feature, 'oldValue' => $oldValue, 'value' => $value]));
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 		});
421 421
 		$this->registerAlias('UserSession', \OCP\IUserSession::class);
422 422
 
423
-		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function (Server $c) {
423
+		$this->registerService(\OC\Authentication\TwoFactorAuth\Manager::class, function(Server $c) {
424 424
 			return new \OC\Authentication\TwoFactorAuth\Manager(
425 425
 				$c->getAppManager(),
426 426
 				$c->getSession(),
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 		$this->registerAlias(\OCP\INavigationManager::class, \OC\NavigationManager::class);
437 437
 		$this->registerAlias('NavigationManager', \OCP\INavigationManager::class);
438 438
 
439
-		$this->registerService(\OC\AllConfig::class, function (Server $c) {
439
+		$this->registerService(\OC\AllConfig::class, function(Server $c) {
440 440
 			return new \OC\AllConfig(
441 441
 				$c->getSystemConfig()
442 442
 			);
@@ -444,17 +444,17 @@  discard block
 block discarded – undo
444 444
 		$this->registerAlias('AllConfig', \OC\AllConfig::class);
445 445
 		$this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class);
446 446
 
447
-		$this->registerService('SystemConfig', function ($c) use ($config) {
447
+		$this->registerService('SystemConfig', function($c) use ($config) {
448 448
 			return new \OC\SystemConfig($config);
449 449
 		});
450 450
 
451
-		$this->registerService(\OC\AppConfig::class, function (Server $c) {
451
+		$this->registerService(\OC\AppConfig::class, function(Server $c) {
452 452
 			return new \OC\AppConfig($c->getDatabaseConnection());
453 453
 		});
454 454
 		$this->registerAlias('AppConfig', \OC\AppConfig::class);
455 455
 		$this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class);
456 456
 
457
-		$this->registerService(\OCP\L10N\IFactory::class, function (Server $c) {
457
+		$this->registerService(\OCP\L10N\IFactory::class, function(Server $c) {
458 458
 			return new \OC\L10N\Factory(
459 459
 				$c->getConfig(),
460 460
 				$c->getRequest(),
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
 		});
465 465
 		$this->registerAlias('L10NFactory', \OCP\L10N\IFactory::class);
466 466
 
467
-		$this->registerService(\OCP\IURLGenerator::class, function (Server $c) {
467
+		$this->registerService(\OCP\IURLGenerator::class, function(Server $c) {
468 468
 			$config = $c->getConfig();
469 469
 			$cacheFactory = $c->getMemCacheFactory();
470 470
 			$request = $c->getRequest();
@@ -479,12 +479,12 @@  discard block
 block discarded – undo
479 479
 		$this->registerAlias('AppFetcher', AppFetcher::class);
480 480
 		$this->registerAlias('CategoryFetcher', CategoryFetcher::class);
481 481
 
482
-		$this->registerService(\OCP\ICache::class, function ($c) {
482
+		$this->registerService(\OCP\ICache::class, function($c) {
483 483
 			return new Cache\File();
484 484
 		});
485 485
 		$this->registerAlias('UserCache', \OCP\ICache::class);
486 486
 
487
-		$this->registerService(Factory::class, function (Server $c) {
487
+		$this->registerService(Factory::class, function(Server $c) {
488 488
 
489 489
 			$arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(),
490 490
 				ArrayCache::class,
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
 				$version = implode(',', $v);
502 502
 				$instanceId = \OC_Util::getInstanceId();
503 503
 				$path = \OC::$SERVERROOT;
504
-				$prefix = md5($instanceId . '-' . $version . '-' . $path);
504
+				$prefix = md5($instanceId.'-'.$version.'-'.$path);
505 505
 				return new \OC\Memcache\Factory($prefix, $c->getLogger(),
506 506
 					$config->getSystemValue('memcache.local', null),
507 507
 					$config->getSystemValue('memcache.distributed', null),
@@ -514,12 +514,12 @@  discard block
 block discarded – undo
514 514
 		$this->registerAlias('MemCacheFactory', Factory::class);
515 515
 		$this->registerAlias(ICacheFactory::class, Factory::class);
516 516
 
517
-		$this->registerService('RedisFactory', function (Server $c) {
517
+		$this->registerService('RedisFactory', function(Server $c) {
518 518
 			$systemConfig = $c->getSystemConfig();
519 519
 			return new RedisFactory($systemConfig);
520 520
 		});
521 521
 
522
-		$this->registerService(\OCP\Activity\IManager::class, function (Server $c) {
522
+		$this->registerService(\OCP\Activity\IManager::class, function(Server $c) {
523 523
 			return new \OC\Activity\Manager(
524 524
 				$c->getRequest(),
525 525
 				$c->getUserSession(),
@@ -529,14 +529,14 @@  discard block
 block discarded – undo
529 529
 		});
530 530
 		$this->registerAlias('ActivityManager', \OCP\Activity\IManager::class);
531 531
 
532
-		$this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) {
532
+		$this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) {
533 533
 			return new \OC\Activity\EventMerger(
534 534
 				$c->getL10N('lib')
535 535
 			);
536 536
 		});
537 537
 		$this->registerAlias(IValidator::class, Validator::class);
538 538
 
539
-		$this->registerService(\OCP\IAvatarManager::class, function (Server $c) {
539
+		$this->registerService(\OCP\IAvatarManager::class, function(Server $c) {
540 540
 			return new AvatarManager(
541 541
 				$c->query(\OC\User\Manager::class),
542 542
 				$c->getAppDataDir('avatar'),
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
 
550 550
 		$this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class);
551 551
 
552
-		$this->registerService(\OCP\ILogger::class, function (Server $c) {
552
+		$this->registerService(\OCP\ILogger::class, function(Server $c) {
553 553
 			$logType = $c->query('AllConfig')->getSystemValue('log_type', 'file');
554 554
 			$logger = Log::getLogClass($logType);
555 555
 			call_user_func(array($logger, 'init'));
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
 		});
561 561
 		$this->registerAlias('Logger', \OCP\ILogger::class);
562 562
 
563
-		$this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) {
563
+		$this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) {
564 564
 			$config = $c->getConfig();
565 565
 			return new \OC\BackgroundJob\JobList(
566 566
 				$c->getDatabaseConnection(),
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
 		});
571 571
 		$this->registerAlias('JobList', \OCP\BackgroundJob\IJobList::class);
572 572
 
573
-		$this->registerService(\OCP\Route\IRouter::class, function (Server $c) {
573
+		$this->registerService(\OCP\Route\IRouter::class, function(Server $c) {
574 574
 			$cacheFactory = $c->getMemCacheFactory();
575 575
 			$logger = $c->getLogger();
576 576
 			if ($cacheFactory->isLocalCacheAvailable()) {
@@ -582,12 +582,12 @@  discard block
 block discarded – undo
582 582
 		});
583 583
 		$this->registerAlias('Router', \OCP\Route\IRouter::class);
584 584
 
585
-		$this->registerService(\OCP\ISearch::class, function ($c) {
585
+		$this->registerService(\OCP\ISearch::class, function($c) {
586 586
 			return new Search();
587 587
 		});
588 588
 		$this->registerAlias('Search', \OCP\ISearch::class);
589 589
 
590
-		$this->registerService(\OC\Security\RateLimiting\Limiter::class, function (Server $c) {
590
+		$this->registerService(\OC\Security\RateLimiting\Limiter::class, function(Server $c) {
591 591
 			return new \OC\Security\RateLimiting\Limiter(
592 592
 				$this->getUserSession(),
593 593
 				$this->getRequest(),
@@ -595,34 +595,34 @@  discard block
 block discarded – undo
595 595
 				$c->query(\OC\Security\RateLimiting\Backend\IBackend::class)
596 596
 			);
597 597
 		});
598
-		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) {
598
+		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) {
599 599
 			return new \OC\Security\RateLimiting\Backend\MemoryCache(
600 600
 				$this->getMemCacheFactory(),
601 601
 				new \OC\AppFramework\Utility\TimeFactory()
602 602
 			);
603 603
 		});
604 604
 
605
-		$this->registerService(\OCP\Security\ISecureRandom::class, function ($c) {
605
+		$this->registerService(\OCP\Security\ISecureRandom::class, function($c) {
606 606
 			return new SecureRandom();
607 607
 		});
608 608
 		$this->registerAlias('SecureRandom', \OCP\Security\ISecureRandom::class);
609 609
 
610
-		$this->registerService(\OCP\Security\ICrypto::class, function (Server $c) {
610
+		$this->registerService(\OCP\Security\ICrypto::class, function(Server $c) {
611 611
 			return new Crypto($c->getConfig(), $c->getSecureRandom());
612 612
 		});
613 613
 		$this->registerAlias('Crypto', \OCP\Security\ICrypto::class);
614 614
 
615
-		$this->registerService(\OCP\Security\IHasher::class, function (Server $c) {
615
+		$this->registerService(\OCP\Security\IHasher::class, function(Server $c) {
616 616
 			return new Hasher($c->getConfig());
617 617
 		});
618 618
 		$this->registerAlias('Hasher', \OCP\Security\IHasher::class);
619 619
 
620
-		$this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) {
620
+		$this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) {
621 621
 			return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection());
622 622
 		});
623 623
 		$this->registerAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class);
624 624
 
625
-		$this->registerService(IDBConnection::class, function (Server $c) {
625
+		$this->registerService(IDBConnection::class, function(Server $c) {
626 626
 			$systemConfig = $c->getSystemConfig();
627 627
 			$factory = new \OC\DB\ConnectionFactory($systemConfig);
628 628
 			$type = $systemConfig->getValue('dbtype', 'sqlite');
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 		$this->registerAlias('DatabaseConnection', IDBConnection::class);
638 638
 
639 639
 
640
-		$this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) {
640
+		$this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) {
641 641
 			$user = \OC_User::getUser();
642 642
 			$uid = $user ? $user : null;
643 643
 			return new ClientService(
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
 			);
653 653
 		});
654 654
 		$this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class);
655
-		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) {
655
+		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) {
656 656
 			$eventLogger = new EventLogger();
657 657
 			if ($c->getSystemConfig()->getValue('debug', false)) {
658 658
 				// In debug mode, module is being activated by default
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
 		});
663 663
 		$this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class);
664 664
 
665
-		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) {
665
+		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) {
666 666
 			$queryLogger = new QueryLogger();
667 667
 			if ($c->getSystemConfig()->getValue('debug', false)) {
668 668
 				// In debug mode, module is being activated by default
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
 		});
673 673
 		$this->registerAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class);
674 674
 
675
-		$this->registerService(TempManager::class, function (Server $c) {
675
+		$this->registerService(TempManager::class, function(Server $c) {
676 676
 			return new TempManager(
677 677
 				$c->getLogger(),
678 678
 				$c->getConfig()
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
 		$this->registerAlias('TempManager', TempManager::class);
682 682
 		$this->registerAlias(ITempManager::class, TempManager::class);
683 683
 
684
-		$this->registerService(AppManager::class, function (Server $c) {
684
+		$this->registerService(AppManager::class, function(Server $c) {
685 685
 			return new \OC\App\AppManager(
686 686
 				$c->getUserSession(),
687 687
 				$c->query(\OC\AppConfig::class),
@@ -693,7 +693,7 @@  discard block
 block discarded – undo
693 693
 		$this->registerAlias('AppManager', AppManager::class);
694 694
 		$this->registerAlias(IAppManager::class, AppManager::class);
695 695
 
696
-		$this->registerService(\OCP\IDateTimeZone::class, function (Server $c) {
696
+		$this->registerService(\OCP\IDateTimeZone::class, function(Server $c) {
697 697
 			return new DateTimeZone(
698 698
 				$c->getConfig(),
699 699
 				$c->getSession()
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
 		});
702 702
 		$this->registerAlias('DateTimeZone', \OCP\IDateTimeZone::class);
703 703
 
704
-		$this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) {
704
+		$this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) {
705 705
 			$language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null);
706 706
 
707 707
 			return new DateTimeFormatter(
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
 		});
712 712
 		$this->registerAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class);
713 713
 
714
-		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) {
714
+		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) {
715 715
 			$mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger());
716 716
 			$listener = new UserMountCacheListener($mountCache);
717 717
 			$listener->listen($c->getUserManager());
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
 		});
720 720
 		$this->registerAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class);
721 721
 
722
-		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) {
722
+		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) {
723 723
 			$loader = \OC\Files\Filesystem::getLoader();
724 724
 			$mountCache = $c->query('UserMountCache');
725 725
 			$manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache);
@@ -735,10 +735,10 @@  discard block
 block discarded – undo
735 735
 		});
736 736
 		$this->registerAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class);
737 737
 
738
-		$this->registerService('IniWrapper', function ($c) {
738
+		$this->registerService('IniWrapper', function($c) {
739 739
 			return new IniGetWrapper();
740 740
 		});
741
-		$this->registerService('AsyncCommandBus', function (Server $c) {
741
+		$this->registerService('AsyncCommandBus', function(Server $c) {
742 742
 			$busClass = $c->getConfig()->getSystemValue('commandbus');
743 743
 			if ($busClass) {
744 744
 				list($app, $class) = explode('::', $busClass, 2);
@@ -753,10 +753,10 @@  discard block
 block discarded – undo
753 753
 				return new CronBus($jobList);
754 754
 			}
755 755
 		});
756
-		$this->registerService('TrustedDomainHelper', function ($c) {
756
+		$this->registerService('TrustedDomainHelper', function($c) {
757 757
 			return new TrustedDomainHelper($this->getConfig());
758 758
 		});
759
-		$this->registerService('Throttler', function (Server $c) {
759
+		$this->registerService('Throttler', function(Server $c) {
760 760
 			return new Throttler(
761 761
 				$c->getDatabaseConnection(),
762 762
 				new TimeFactory(),
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
 				$c->getConfig()
765 765
 			);
766 766
 		});
767
-		$this->registerService('IntegrityCodeChecker', function (Server $c) {
767
+		$this->registerService('IntegrityCodeChecker', function(Server $c) {
768 768
 			// IConfig and IAppManager requires a working database. This code
769 769
 			// might however be called when ownCloud is not yet setup.
770 770
 			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
 				$c->getTempManager()
786 786
 			);
787 787
 		});
788
-		$this->registerService(\OCP\IRequest::class, function ($c) {
788
+		$this->registerService(\OCP\IRequest::class, function($c) {
789 789
 			if (isset($this['urlParams'])) {
790 790
 				$urlParams = $this['urlParams'];
791 791
 			} else {
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
 		});
822 822
 		$this->registerAlias('Request', \OCP\IRequest::class);
823 823
 
824
-		$this->registerService(\OCP\Mail\IMailer::class, function (Server $c) {
824
+		$this->registerService(\OCP\Mail\IMailer::class, function(Server $c) {
825 825
 			return new Mailer(
826 826
 				$c->getConfig(),
827 827
 				$c->getLogger(),
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
 		});
833 833
 		$this->registerAlias('Mailer', \OCP\Mail\IMailer::class);
834 834
 
835
-		$this->registerService('LDAPProvider', function (Server $c) {
835
+		$this->registerService('LDAPProvider', function(Server $c) {
836 836
 			$config = $c->getConfig();
837 837
 			$factoryClass = $config->getSystemValue('ldapProviderFactory', null);
838 838
 			if (is_null($factoryClass)) {
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
 			$factory = new $factoryClass($this);
843 843
 			return $factory->getLDAPProvider();
844 844
 		});
845
-		$this->registerService(ILockingProvider::class, function (Server $c) {
845
+		$this->registerService(ILockingProvider::class, function(Server $c) {
846 846
 			$ini = $c->getIniWrapper();
847 847
 			$config = $c->getConfig();
848 848
 			$ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time')));
@@ -865,49 +865,49 @@  discard block
 block discarded – undo
865 865
 		});
866 866
 		$this->registerAlias('LockingProvider', ILockingProvider::class);
867 867
 
868
-		$this->registerService(\OCP\Files\Mount\IMountManager::class, function () {
868
+		$this->registerService(\OCP\Files\Mount\IMountManager::class, function() {
869 869
 			return new \OC\Files\Mount\Manager();
870 870
 		});
871 871
 		$this->registerAlias('MountManager', \OCP\Files\Mount\IMountManager::class);
872 872
 
873
-		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) {
873
+		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) {
874 874
 			return new \OC\Files\Type\Detection(
875 875
 				$c->getURLGenerator(),
876 876
 				\OC::$configDir,
877
-				\OC::$SERVERROOT . '/resources/config/'
877
+				\OC::$SERVERROOT.'/resources/config/'
878 878
 			);
879 879
 		});
880 880
 		$this->registerAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class);
881 881
 
882
-		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) {
882
+		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) {
883 883
 			return new \OC\Files\Type\Loader(
884 884
 				$c->getDatabaseConnection()
885 885
 			);
886 886
 		});
887 887
 		$this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class);
888
-		$this->registerService(BundleFetcher::class, function () {
888
+		$this->registerService(BundleFetcher::class, function() {
889 889
 			return new BundleFetcher($this->getL10N('lib'));
890 890
 		});
891
-		$this->registerService(\OCP\Notification\IManager::class, function (Server $c) {
891
+		$this->registerService(\OCP\Notification\IManager::class, function(Server $c) {
892 892
 			return new Manager(
893 893
 				$c->query(IValidator::class)
894 894
 			);
895 895
 		});
896 896
 		$this->registerAlias('NotificationManager', \OCP\Notification\IManager::class);
897 897
 
898
-		$this->registerService(\OC\CapabilitiesManager::class, function (Server $c) {
898
+		$this->registerService(\OC\CapabilitiesManager::class, function(Server $c) {
899 899
 			$manager = new \OC\CapabilitiesManager($c->getLogger());
900
-			$manager->registerCapability(function () use ($c) {
900
+			$manager->registerCapability(function() use ($c) {
901 901
 				return new \OC\OCS\CoreCapabilities($c->getConfig());
902 902
 			});
903
-			$manager->registerCapability(function () use ($c) {
903
+			$manager->registerCapability(function() use ($c) {
904 904
 				return $c->query(\OC\Security\Bruteforce\Capabilities::class);
905 905
 			});
906 906
 			return $manager;
907 907
 		});
908 908
 		$this->registerAlias('CapabilitiesManager', \OC\CapabilitiesManager::class);
909 909
 
910
-		$this->registerService(\OCP\Comments\ICommentsManager::class, function (Server $c) {
910
+		$this->registerService(\OCP\Comments\ICommentsManager::class, function(Server $c) {
911 911
 			$config = $c->getConfig();
912 912
 			$factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class);
913 913
 			/** @var \OCP\Comments\ICommentsManagerFactory $factory */
@@ -917,7 +917,7 @@  discard block
 block discarded – undo
917 917
 			$manager->registerDisplayNameResolver('user', function($id) use ($c) {
918 918
 				$manager = $c->getUserManager();
919 919
 				$user = $manager->get($id);
920
-				if(is_null($user)) {
920
+				if (is_null($user)) {
921 921
 					$l = $c->getL10N('core');
922 922
 					$displayName = $l->t('Unknown user');
923 923
 				} else {
@@ -930,7 +930,7 @@  discard block
 block discarded – undo
930 930
 		});
931 931
 		$this->registerAlias('CommentsManager', \OCP\Comments\ICommentsManager::class);
932 932
 
933
-		$this->registerService('ThemingDefaults', function (Server $c) {
933
+		$this->registerService('ThemingDefaults', function(Server $c) {
934 934
 			/*
935 935
 			 * Dark magic for autoloader.
936 936
 			 * If we do a class_exists it will try to load the class which will
@@ -957,7 +957,7 @@  discard block
 block discarded – undo
957 957
 			}
958 958
 			return new \OC_Defaults();
959 959
 		});
960
-		$this->registerService(SCSSCacher::class, function (Server $c) {
960
+		$this->registerService(SCSSCacher::class, function(Server $c) {
961 961
 			/** @var Factory $cacheFactory */
962 962
 			$cacheFactory = $c->query(Factory::class);
963 963
 			return new SCSSCacher(
@@ -970,7 +970,7 @@  discard block
 block discarded – undo
970 970
 				$this->getMemCacheFactory()
971 971
 			);
972 972
 		});
973
-		$this->registerService(JSCombiner::class, function (Server $c) {
973
+		$this->registerService(JSCombiner::class, function(Server $c) {
974 974
 			/** @var Factory $cacheFactory */
975 975
 			$cacheFactory = $c->query(Factory::class);
976 976
 			return new JSCombiner(
@@ -981,13 +981,13 @@  discard block
 block discarded – undo
981 981
 				$c->getLogger()
982 982
 			);
983 983
 		});
984
-		$this->registerService(EventDispatcher::class, function () {
984
+		$this->registerService(EventDispatcher::class, function() {
985 985
 			return new EventDispatcher();
986 986
 		});
987 987
 		$this->registerAlias('EventDispatcher', EventDispatcher::class);
988 988
 		$this->registerAlias(EventDispatcherInterface::class, EventDispatcher::class);
989 989
 
990
-		$this->registerService('CryptoWrapper', function (Server $c) {
990
+		$this->registerService('CryptoWrapper', function(Server $c) {
991 991
 			// FIXME: Instantiiated here due to cyclic dependency
992 992
 			$request = new Request(
993 993
 				[
@@ -1012,7 +1012,7 @@  discard block
 block discarded – undo
1012 1012
 				$request
1013 1013
 			);
1014 1014
 		});
1015
-		$this->registerService('CsrfTokenManager', function (Server $c) {
1015
+		$this->registerService('CsrfTokenManager', function(Server $c) {
1016 1016
 			$tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom());
1017 1017
 
1018 1018
 			return new CsrfTokenManager(
@@ -1020,22 +1020,22 @@  discard block
 block discarded – undo
1020 1020
 				$c->query(SessionStorage::class)
1021 1021
 			);
1022 1022
 		});
1023
-		$this->registerService(SessionStorage::class, function (Server $c) {
1023
+		$this->registerService(SessionStorage::class, function(Server $c) {
1024 1024
 			return new SessionStorage($c->getSession());
1025 1025
 		});
1026
-		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function (Server $c) {
1026
+		$this->registerService(\OCP\Security\IContentSecurityPolicyManager::class, function(Server $c) {
1027 1027
 			return new ContentSecurityPolicyManager();
1028 1028
 		});
1029 1029
 		$this->registerAlias('ContentSecurityPolicyManager', \OCP\Security\IContentSecurityPolicyManager::class);
1030 1030
 
1031
-		$this->registerService('ContentSecurityPolicyNonceManager', function (Server $c) {
1031
+		$this->registerService('ContentSecurityPolicyNonceManager', function(Server $c) {
1032 1032
 			return new ContentSecurityPolicyNonceManager(
1033 1033
 				$c->getCsrfTokenManager(),
1034 1034
 				$c->getRequest()
1035 1035
 			);
1036 1036
 		});
1037 1037
 
1038
-		$this->registerService(\OCP\Share\IManager::class, function (Server $c) {
1038
+		$this->registerService(\OCP\Share\IManager::class, function(Server $c) {
1039 1039
 			$config = $c->getConfig();
1040 1040
 			$factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class);
1041 1041
 			/** @var \OCP\Share\IProviderFactory $factory */
@@ -1078,7 +1078,7 @@  discard block
 block discarded – undo
1078 1078
 
1079 1079
 		$this->registerAlias(\OCP\Collaboration\AutoComplete\IManager::class, \OC\Collaboration\AutoComplete\Manager::class);
1080 1080
 
1081
-		$this->registerService('SettingsManager', function (Server $c) {
1081
+		$this->registerService('SettingsManager', function(Server $c) {
1082 1082
 			$manager = new \OC\Settings\Manager(
1083 1083
 				$c->getLogger(),
1084 1084
 				$c->getDatabaseConnection(),
@@ -1096,36 +1096,36 @@  discard block
 block discarded – undo
1096 1096
 			);
1097 1097
 			return $manager;
1098 1098
 		});
1099
-		$this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) {
1099
+		$this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) {
1100 1100
 			return new \OC\Files\AppData\Factory(
1101 1101
 				$c->getRootFolder(),
1102 1102
 				$c->getSystemConfig()
1103 1103
 			);
1104 1104
 		});
1105 1105
 
1106
-		$this->registerService('LockdownManager', function (Server $c) {
1107
-			return new LockdownManager(function () use ($c) {
1106
+		$this->registerService('LockdownManager', function(Server $c) {
1107
+			return new LockdownManager(function() use ($c) {
1108 1108
 				return $c->getSession();
1109 1109
 			});
1110 1110
 		});
1111 1111
 
1112
-		$this->registerService(\OCP\OCS\IDiscoveryService::class, function (Server $c) {
1112
+		$this->registerService(\OCP\OCS\IDiscoveryService::class, function(Server $c) {
1113 1113
 			return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService());
1114 1114
 		});
1115 1115
 
1116
-		$this->registerService(ICloudIdManager::class, function (Server $c) {
1116
+		$this->registerService(ICloudIdManager::class, function(Server $c) {
1117 1117
 			return new CloudIdManager();
1118 1118
 		});
1119 1119
 
1120
-		$this->registerService(IConfig::class, function (Server $c) {
1120
+		$this->registerService(IConfig::class, function(Server $c) {
1121 1121
 			return new GlobalScale\Config($c->getConfig());
1122 1122
 		});
1123 1123
 
1124
-		$this->registerService(ICloudFederationProviderManager::class, function (Server $c) {
1124
+		$this->registerService(ICloudFederationProviderManager::class, function(Server $c) {
1125 1125
 			return new CloudFederationProviderManager();
1126 1126
 		});
1127 1127
 
1128
-		$this->registerService(ICloudFederationFactory::class, function (Server $c) {
1128
+		$this->registerService(ICloudFederationFactory::class, function(Server $c) {
1129 1129
 			return new CloudFederationFactory();
1130 1130
 		});
1131 1131
 
@@ -1135,18 +1135,18 @@  discard block
 block discarded – undo
1135 1135
 		$this->registerAlias(\OCP\AppFramework\Utility\ITimeFactory::class, \OC\AppFramework\Utility\TimeFactory::class);
1136 1136
 		$this->registerAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class);
1137 1137
 
1138
-		$this->registerService(Defaults::class, function (Server $c) {
1138
+		$this->registerService(Defaults::class, function(Server $c) {
1139 1139
 			return new Defaults(
1140 1140
 				$c->getThemingDefaults()
1141 1141
 			);
1142 1142
 		});
1143 1143
 		$this->registerAlias('Defaults', \OCP\Defaults::class);
1144 1144
 
1145
-		$this->registerService(\OCP\ISession::class, function (SimpleContainer $c) {
1145
+		$this->registerService(\OCP\ISession::class, function(SimpleContainer $c) {
1146 1146
 			return $c->query(\OCP\IUserSession::class)->getSession();
1147 1147
 		});
1148 1148
 
1149
-		$this->registerService(IShareHelper::class, function (Server $c) {
1149
+		$this->registerService(IShareHelper::class, function(Server $c) {
1150 1150
 			return new ShareHelper(
1151 1151
 				$c->query(\OCP\Share\IManager::class)
1152 1152
 			);
@@ -1208,11 +1208,11 @@  discard block
 block discarded – undo
1208 1208
 				// no avatar to remove
1209 1209
 			} catch (\Exception $e) {
1210 1210
 				// Ignore exceptions
1211
-				$logger->info('Could not cleanup avatar of ' . $user->getUID());
1211
+				$logger->info('Could not cleanup avatar of '.$user->getUID());
1212 1212
 			}
1213 1213
 		});
1214 1214
 
1215
-		$dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) {
1215
+		$dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) {
1216 1216
 			$manager = $this->getAvatarManager();
1217 1217
 			/** @var IUser $user */
1218 1218
 			$user = $e->getSubject();
@@ -1363,7 +1363,7 @@  discard block
 block discarded – undo
1363 1363
 	 * @deprecated since 9.2.0 use IAppData
1364 1364
 	 */
1365 1365
 	public function getAppFolder() {
1366
-		$dir = '/' . \OC_App::getCurrentApp();
1366
+		$dir = '/'.\OC_App::getCurrentApp();
1367 1367
 		$root = $this->getRootFolder();
1368 1368
 		if (!$root->nodeExists($dir)) {
1369 1369
 			$folder = $root->newFolder($dir);
@@ -1930,7 +1930,7 @@  discard block
 block discarded – undo
1930 1930
 	/**
1931 1931
 	 * @return \OCP\Collaboration\AutoComplete\IManager
1932 1932
 	 */
1933
-	public function getAutoCompleteManager(){
1933
+	public function getAutoCompleteManager() {
1934 1934
 		return $this->query(IManager::class);
1935 1935
 	}
1936 1936
 
Please login to merge, or discard this patch.