Passed
Push — master ( 456412...602de2 )
by Joas
13:17 queued 10s
created
apps/provisioning_api/composer/composer/autoload_classmap.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,16 +6,16 @@
 block discarded – undo
6 6
 $baseDir = $vendorDir;
7 7
 
8 8
 return array(
9
-    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
-    'OCA\\Provisioning_API\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
11
-    'OCA\\Provisioning_API\\Capabilities' => $baseDir . '/../lib/Capabilities.php',
12
-    'OCA\\Provisioning_API\\Controller\\AUserData' => $baseDir . '/../lib/Controller/AUserData.php',
13
-    'OCA\\Provisioning_API\\Controller\\AppConfigController' => $baseDir . '/../lib/Controller/AppConfigController.php',
14
-    'OCA\\Provisioning_API\\Controller\\AppsController' => $baseDir . '/../lib/Controller/AppsController.php',
15
-    'OCA\\Provisioning_API\\Controller\\GroupsController' => $baseDir . '/../lib/Controller/GroupsController.php',
16
-    'OCA\\Provisioning_API\\Controller\\UsersController' => $baseDir . '/../lib/Controller/UsersController.php',
17
-    'OCA\\Provisioning_API\\FederatedShareProviderFactory' => $baseDir . '/../lib/FederatedShareProviderFactory.php',
18
-    'OCA\\Provisioning_API\\Listener\\UserDeletedListener' => $baseDir . '/../lib/Listener/UserDeletedListener.php',
19
-    'OCA\\Provisioning_API\\Middleware\\Exceptions\\NotSubAdminException' => $baseDir . '/../lib/Middleware/Exceptions/NotSubAdminException.php',
20
-    'OCA\\Provisioning_API\\Middleware\\ProvisioningApiMiddleware' => $baseDir . '/../lib/Middleware/ProvisioningApiMiddleware.php',
9
+    'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php',
10
+    'OCA\\Provisioning_API\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php',
11
+    'OCA\\Provisioning_API\\Capabilities' => $baseDir.'/../lib/Capabilities.php',
12
+    'OCA\\Provisioning_API\\Controller\\AUserData' => $baseDir.'/../lib/Controller/AUserData.php',
13
+    'OCA\\Provisioning_API\\Controller\\AppConfigController' => $baseDir.'/../lib/Controller/AppConfigController.php',
14
+    'OCA\\Provisioning_API\\Controller\\AppsController' => $baseDir.'/../lib/Controller/AppsController.php',
15
+    'OCA\\Provisioning_API\\Controller\\GroupsController' => $baseDir.'/../lib/Controller/GroupsController.php',
16
+    'OCA\\Provisioning_API\\Controller\\UsersController' => $baseDir.'/../lib/Controller/UsersController.php',
17
+    'OCA\\Provisioning_API\\FederatedShareProviderFactory' => $baseDir.'/../lib/FederatedShareProviderFactory.php',
18
+    'OCA\\Provisioning_API\\Listener\\UserDeletedListener' => $baseDir.'/../lib/Listener/UserDeletedListener.php',
19
+    'OCA\\Provisioning_API\\Middleware\\Exceptions\\NotSubAdminException' => $baseDir.'/../lib/Middleware/Exceptions/NotSubAdminException.php',
20
+    'OCA\\Provisioning_API\\Middleware\\ProvisioningApiMiddleware' => $baseDir.'/../lib/Middleware/ProvisioningApiMiddleware.php',
21 21
 );
Please login to merge, or discard this patch.
apps/provisioning_api/composer/composer/autoload_static.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -6,38 +6,38 @@
 block discarded – undo
6 6
 
7 7
 class ComposerStaticInitProvisioning_API
8 8
 {
9
-    public static $prefixLengthsPsr4 = array (
9
+    public static $prefixLengthsPsr4 = array(
10 10
         'O' => 
11
-        array (
11
+        array(
12 12
             'OCA\\Provisioning_API\\' => 21,
13 13
         ),
14 14
     );
15 15
 
16
-    public static $prefixDirsPsr4 = array (
16
+    public static $prefixDirsPsr4 = array(
17 17
         'OCA\\Provisioning_API\\' => 
18
-        array (
19
-            0 => __DIR__ . '/..' . '/../lib',
18
+        array(
19
+            0 => __DIR__.'/..'.'/../lib',
20 20
         ),
21 21
     );
22 22
 
23
-    public static $classMap = array (
24
-        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
25
-        'OCA\\Provisioning_API\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
26
-        'OCA\\Provisioning_API\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php',
27
-        'OCA\\Provisioning_API\\Controller\\AUserData' => __DIR__ . '/..' . '/../lib/Controller/AUserData.php',
28
-        'OCA\\Provisioning_API\\Controller\\AppConfigController' => __DIR__ . '/..' . '/../lib/Controller/AppConfigController.php',
29
-        'OCA\\Provisioning_API\\Controller\\AppsController' => __DIR__ . '/..' . '/../lib/Controller/AppsController.php',
30
-        'OCA\\Provisioning_API\\Controller\\GroupsController' => __DIR__ . '/..' . '/../lib/Controller/GroupsController.php',
31
-        'OCA\\Provisioning_API\\Controller\\UsersController' => __DIR__ . '/..' . '/../lib/Controller/UsersController.php',
32
-        'OCA\\Provisioning_API\\FederatedShareProviderFactory' => __DIR__ . '/..' . '/../lib/FederatedShareProviderFactory.php',
33
-        'OCA\\Provisioning_API\\Listener\\UserDeletedListener' => __DIR__ . '/..' . '/../lib/Listener/UserDeletedListener.php',
34
-        'OCA\\Provisioning_API\\Middleware\\Exceptions\\NotSubAdminException' => __DIR__ . '/..' . '/../lib/Middleware/Exceptions/NotSubAdminException.php',
35
-        'OCA\\Provisioning_API\\Middleware\\ProvisioningApiMiddleware' => __DIR__ . '/..' . '/../lib/Middleware/ProvisioningApiMiddleware.php',
23
+    public static $classMap = array(
24
+        'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php',
25
+        'OCA\\Provisioning_API\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php',
26
+        'OCA\\Provisioning_API\\Capabilities' => __DIR__.'/..'.'/../lib/Capabilities.php',
27
+        'OCA\\Provisioning_API\\Controller\\AUserData' => __DIR__.'/..'.'/../lib/Controller/AUserData.php',
28
+        'OCA\\Provisioning_API\\Controller\\AppConfigController' => __DIR__.'/..'.'/../lib/Controller/AppConfigController.php',
29
+        'OCA\\Provisioning_API\\Controller\\AppsController' => __DIR__.'/..'.'/../lib/Controller/AppsController.php',
30
+        'OCA\\Provisioning_API\\Controller\\GroupsController' => __DIR__.'/..'.'/../lib/Controller/GroupsController.php',
31
+        'OCA\\Provisioning_API\\Controller\\UsersController' => __DIR__.'/..'.'/../lib/Controller/UsersController.php',
32
+        'OCA\\Provisioning_API\\FederatedShareProviderFactory' => __DIR__.'/..'.'/../lib/FederatedShareProviderFactory.php',
33
+        'OCA\\Provisioning_API\\Listener\\UserDeletedListener' => __DIR__.'/..'.'/../lib/Listener/UserDeletedListener.php',
34
+        'OCA\\Provisioning_API\\Middleware\\Exceptions\\NotSubAdminException' => __DIR__.'/..'.'/../lib/Middleware/Exceptions/NotSubAdminException.php',
35
+        'OCA\\Provisioning_API\\Middleware\\ProvisioningApiMiddleware' => __DIR__.'/..'.'/../lib/Middleware/ProvisioningApiMiddleware.php',
36 36
     );
37 37
 
38 38
     public static function getInitializer(ClassLoader $loader)
39 39
     {
40
-        return \Closure::bind(function () use ($loader) {
40
+        return \Closure::bind(function() use ($loader) {
41 41
             $loader->prefixLengthsPsr4 = ComposerStaticInitProvisioning_API::$prefixLengthsPsr4;
42 42
             $loader->prefixDirsPsr4 = ComposerStaticInitProvisioning_API::$prefixDirsPsr4;
43 43
             $loader->classMap = ComposerStaticInitProvisioning_API::$classMap;
Please login to merge, or discard this patch.
apps/provisioning_api/lib/Controller/UsersController.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 		$matches = [];
275 275
 		foreach ($userMatches as $phone => $userId) {
276 276
 			// Not using the ICloudIdManager as that would run a search for each contact to find the display name in the address book
277
-			$matches[$normalizedNumberToKey[$phone]] = $userId . '@' . $cloudUrl;
277
+			$matches[$normalizedNumberToKey[$phone]] = $userId.'@'.$cloudUrl;
278 278
 			$this->knownUserService->storeIsKnownToUser($knownTo, $userId);
279 279
 		}
280 280
 
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 					throw new OCSException('group '.$group.' does not exist', 104);
339 339
 				}
340 340
 				if (!$isAdmin && !$subAdminManager->isSubAdminOfGroup($user, $this->groupManager->get($group))) {
341
-					throw new OCSException('insufficient privileges for group '. $group, 105);
341
+					throw new OCSException('insufficient privileges for group '.$group, 105);
342 342
 				}
343 343
 			}
344 344
 		} else {
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 				$group = $this->groupManager->get($groupid);
354 354
 				// Check if group exists
355 355
 				if ($group === null) {
356
-					throw new OCSException('Subadmin group does not exist',  102);
356
+					throw new OCSException('Subadmin group does not exist', 102);
357 357
 				}
358 358
 				// Check if trying to make subadmin of admin group
359 359
 				if ($group->getGID() === 'admin') {
@@ -394,11 +394,11 @@  discard block
 block discarded – undo
394 394
 
395 395
 		try {
396 396
 			$newUser = $this->userManager->createUser($userid, $password);
397
-			$this->logger->info('Successful addUser call with userid: ' . $userid, ['app' => 'ocs_api']);
397
+			$this->logger->info('Successful addUser call with userid: '.$userid, ['app' => 'ocs_api']);
398 398
 
399 399
 			foreach ($groups as $group) {
400 400
 				$this->groupManager->get($group)->addUser($newUser);
401
-				$this->logger->info('Added userid ' . $userid . ' to group ' . $group, ['app' => 'ocs_api']);
401
+				$this->logger->info('Added userid '.$userid.' to group '.$group, ['app' => 'ocs_api']);
402 402
 			}
403 403
 			foreach ($subadminGroups as $group) {
404 404
 				$subAdminManager->createSubAdmin($newUser, $group);
@@ -571,8 +571,8 @@  discard block
 block discarded – undo
571 571
 				$permittedFields[] = IAccountManager::PROPERTY_EMAIL;
572 572
 			}
573 573
 
574
-			$permittedFields[] = IAccountManager::PROPERTY_DISPLAYNAME . self::SCOPE_SUFFIX;
575
-			$permittedFields[] = IAccountManager::PROPERTY_EMAIL . self::SCOPE_SUFFIX;
574
+			$permittedFields[] = IAccountManager::PROPERTY_DISPLAYNAME.self::SCOPE_SUFFIX;
575
+			$permittedFields[] = IAccountManager::PROPERTY_EMAIL.self::SCOPE_SUFFIX;
576 576
 
577 577
 			$permittedFields[] = 'password';
578 578
 			if ($this->config->getSystemValue('force_language', false) === false ||
@@ -589,12 +589,12 @@  discard block
 block discarded – undo
589 589
 			$permittedFields[] = IAccountManager::PROPERTY_ADDRESS;
590 590
 			$permittedFields[] = IAccountManager::PROPERTY_WEBSITE;
591 591
 			$permittedFields[] = IAccountManager::PROPERTY_TWITTER;
592
-			$permittedFields[] = IAccountManager::PROPERTY_PHONE . self::SCOPE_SUFFIX;
593
-			$permittedFields[] = IAccountManager::PROPERTY_ADDRESS . self::SCOPE_SUFFIX;
594
-			$permittedFields[] = IAccountManager::PROPERTY_WEBSITE . self::SCOPE_SUFFIX;
595
-			$permittedFields[] = IAccountManager::PROPERTY_TWITTER . self::SCOPE_SUFFIX;
592
+			$permittedFields[] = IAccountManager::PROPERTY_PHONE.self::SCOPE_SUFFIX;
593
+			$permittedFields[] = IAccountManager::PROPERTY_ADDRESS.self::SCOPE_SUFFIX;
594
+			$permittedFields[] = IAccountManager::PROPERTY_WEBSITE.self::SCOPE_SUFFIX;
595
+			$permittedFields[] = IAccountManager::PROPERTY_TWITTER.self::SCOPE_SUFFIX;
596 596
 
597
-			$permittedFields[] = IAccountManager::PROPERTY_AVATAR . self::SCOPE_SUFFIX;
597
+			$permittedFields[] = IAccountManager::PROPERTY_AVATAR.self::SCOPE_SUFFIX;
598 598
 
599 599
 			// If admin they can edit their own quota
600 600
 			if ($this->groupManager->isAdmin($currentLoggedInUser->getUID())) {
@@ -695,17 +695,17 @@  discard block
 block discarded – undo
695 695
 							$this->knownUserService->deleteByContactUserId($targetUser->getUID());
696 696
 						}
697 697
 					} catch (\InvalidArgumentException $e) {
698
-						throw new OCSException('Invalid ' . $e->getMessage(), 102);
698
+						throw new OCSException('Invalid '.$e->getMessage(), 102);
699 699
 					}
700 700
 				}
701 701
 				break;
702
-			case IAccountManager::PROPERTY_DISPLAYNAME . self::SCOPE_SUFFIX:
703
-			case IAccountManager::PROPERTY_EMAIL . self::SCOPE_SUFFIX:
704
-			case IAccountManager::PROPERTY_PHONE . self::SCOPE_SUFFIX:
705
-			case IAccountManager::PROPERTY_ADDRESS . self::SCOPE_SUFFIX:
706
-			case IAccountManager::PROPERTY_WEBSITE . self::SCOPE_SUFFIX:
707
-			case IAccountManager::PROPERTY_TWITTER . self::SCOPE_SUFFIX:
708
-			case IAccountManager::PROPERTY_AVATAR . self::SCOPE_SUFFIX:
702
+			case IAccountManager::PROPERTY_DISPLAYNAME.self::SCOPE_SUFFIX:
703
+			case IAccountManager::PROPERTY_EMAIL.self::SCOPE_SUFFIX:
704
+			case IAccountManager::PROPERTY_PHONE.self::SCOPE_SUFFIX:
705
+			case IAccountManager::PROPERTY_ADDRESS.self::SCOPE_SUFFIX:
706
+			case IAccountManager::PROPERTY_WEBSITE.self::SCOPE_SUFFIX:
707
+			case IAccountManager::PROPERTY_TWITTER.self::SCOPE_SUFFIX:
708
+			case IAccountManager::PROPERTY_AVATAR.self::SCOPE_SUFFIX:
709 709
 				$propertyName = substr($key, 0, strlen($key) - strlen(self::SCOPE_SUFFIX));
710 710
 				$userAccount = $this->accountManager->getUser($targetUser);
711 711
 				if ($userAccount[$propertyName]['scope'] !== $value) {
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
 					try {
714 714
 						$this->accountManager->updateUser($targetUser, $userAccount, true);
715 715
 					} catch (\InvalidArgumentException $e) {
716
-						throw new OCSException('Invalid ' . $e->getMessage(), 102);
716
+						throw new OCSException('Invalid '.$e->getMessage(), 102);
717 717
 					}
718 718
 				}
719 719
 				break;
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
 		} elseif (!$this->groupManager->isAdmin($loggedInUser->getUID())) {
961 961
 			/** @var IGroup[] $subAdminGroups */
962 962
 			$subAdminGroups = $subAdminManager->getSubAdminsGroups($loggedInUser);
963
-			$subAdminGroups = array_map(function (IGroup $subAdminGroup) {
963
+			$subAdminGroups = array_map(function(IGroup $subAdminGroup) {
964 964
 				return $subAdminGroup->getGID();
965 965
 			}, $subAdminGroups);
966 966
 			$userGroups = $this->groupManager->getUserGroupIds($targetUser);
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
 		}
998 998
 		// Check if group exists
999 999
 		if ($group === null) {
1000
-			throw new OCSException('Group does not exist',  102);
1000
+			throw new OCSException('Group does not exist', 102);
1001 1001
 		}
1002 1002
 		// Check if trying to make subadmin of admin group
1003 1003
 		if ($group->getGID() === 'admin') {
Please login to merge, or discard this patch.
apps/provisioning_api/lib/Controller/AUserData.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -141,16 +141,16 @@  discard block
 block discarded – undo
141 141
 		$data['quota'] = $this->fillStorageInfo($targetUserObject->getUID());
142 142
 
143 143
 		if ($includeScopes) {
144
-			$data[IAccountManager::PROPERTY_AVATAR . self::SCOPE_SUFFIX] = $userAccount->getProperty(IAccountManager::PROPERTY_AVATAR)->getScope();
144
+			$data[IAccountManager::PROPERTY_AVATAR.self::SCOPE_SUFFIX] = $userAccount->getProperty(IAccountManager::PROPERTY_AVATAR)->getScope();
145 145
 		}
146 146
 
147 147
 		$data[IAccountManager::PROPERTY_EMAIL] = $targetUserObject->getEMailAddress();
148 148
 		if ($includeScopes) {
149
-			$data[IAccountManager::PROPERTY_EMAIL . self::SCOPE_SUFFIX] = $userAccount->getProperty(IAccountManager::PROPERTY_EMAIL)->getScope();
149
+			$data[IAccountManager::PROPERTY_EMAIL.self::SCOPE_SUFFIX] = $userAccount->getProperty(IAccountManager::PROPERTY_EMAIL)->getScope();
150 150
 		}
151 151
 		$data[IAccountManager::PROPERTY_DISPLAYNAME] = $targetUserObject->getDisplayName();
152 152
 		if ($includeScopes) {
153
-			$data[IAccountManager::PROPERTY_DISPLAYNAME . self::SCOPE_SUFFIX] = $userAccount->getProperty(IAccountManager::PROPERTY_DISPLAYNAME)->getScope();
153
+			$data[IAccountManager::PROPERTY_DISPLAYNAME.self::SCOPE_SUFFIX] = $userAccount->getProperty(IAccountManager::PROPERTY_DISPLAYNAME)->getScope();
154 154
 		}
155 155
 
156 156
 		foreach ([
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 			$property = $userAccount->getProperty($propertyName);
163 163
 			$data[$propertyName] = $property->getValue();
164 164
 			if ($includeScopes) {
165
-				$data[$propertyName . self::SCOPE_SUFFIX] = $property->getScope();
165
+				$data[$propertyName.self::SCOPE_SUFFIX] = $property->getScope();
166 166
 			}
167 167
 		}
168 168
 
Please login to merge, or discard this patch.
lib/private/Avatar/PlaceholderAvatar.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -122,9 +122,9 @@  discard block
 block discarded – undo
122 122
 		$ext = 'png';
123 123
 
124 124
 		if ($size === -1) {
125
-			$path = 'avatar-placeholder.' . $ext;
125
+			$path = 'avatar-placeholder.'.$ext;
126 126
 		} else {
127
-			$path = 'avatar-placeholder.' . $size . '.' . $ext;
127
+			$path = 'avatar-placeholder.'.$size.'.'.$ext;
128 128
 		}
129 129
 
130 130
 		try {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 				$file = $this->folder->newFile($path);
143 143
 				$file->putContent($data);
144 144
 			} catch (NotPermittedException $e) {
145
-				$this->logger->error('Failed to save avatar placeholder for ' . $this->user->getUID());
145
+				$this->logger->error('Failed to save avatar placeholder for '.$this->user->getUID());
146 146
 				throw new NotFoundException();
147 147
 			}
148 148
 		}
Please login to merge, or discard this patch.
lib/private/Server.php 1 patch
Spacing   +97 added lines, -97 removed lines patch added patch discarded remove patch
@@ -268,10 +268,10 @@  discard block
 block discarded – undo
268 268
 		$this->registerParameter('isCLI', \OC::$CLI);
269 269
 		$this->registerParameter('serverRoot', \OC::$SERVERROOT);
270 270
 
271
-		$this->registerService(ContainerInterface::class, function (ContainerInterface $c) {
271
+		$this->registerService(ContainerInterface::class, function(ContainerInterface $c) {
272 272
 			return $c;
273 273
 		});
274
-		$this->registerService(\OCP\IServerContainer::class, function (ContainerInterface $c) {
274
+		$this->registerService(\OCP\IServerContainer::class, function(ContainerInterface $c) {
275 275
 			return $c;
276 276
 		});
277 277
 
@@ -296,11 +296,11 @@  discard block
 block discarded – undo
296 296
 
297 297
 		$this->registerAlias(IActionFactory::class, ActionFactory::class);
298 298
 
299
-		$this->registerService(View::class, function (Server $c) {
299
+		$this->registerService(View::class, function(Server $c) {
300 300
 			return new View();
301 301
 		}, false);
302 302
 
303
-		$this->registerService(IPreview::class, function (ContainerInterface $c) {
303
+		$this->registerService(IPreview::class, function(ContainerInterface $c) {
304 304
 			return new PreviewManager(
305 305
 				$c->get(\OCP\IConfig::class),
306 306
 				$c->get(IRootFolder::class),
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 		/** @deprecated 19.0.0 */
317 317
 		$this->registerDeprecatedAlias('PreviewManager', IPreview::class);
318 318
 
319
-		$this->registerService(\OC\Preview\Watcher::class, function (ContainerInterface $c) {
319
+		$this->registerService(\OC\Preview\Watcher::class, function(ContainerInterface $c) {
320 320
 			return new \OC\Preview\Watcher(
321 321
 				new \OC\Preview\Storage\Root(
322 322
 					$c->get(IRootFolder::class),
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 			);
326 326
 		});
327 327
 
328
-		$this->registerService(\OCP\Encryption\IManager::class, function (Server $c) {
328
+		$this->registerService(\OCP\Encryption\IManager::class, function(Server $c) {
329 329
 			$view = new View();
330 330
 			$util = new Encryption\Util(
331 331
 				$view,
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 
348 348
 		/** @deprecated 21.0.0 */
349 349
 		$this->registerDeprecatedAlias('EncryptionFileHelper', IFile::class);
350
-		$this->registerService(IFile::class, function (ContainerInterface $c) {
350
+		$this->registerService(IFile::class, function(ContainerInterface $c) {
351 351
 			$util = new Encryption\Util(
352 352
 				new View(),
353 353
 				$c->get(IUserManager::class),
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 
364 364
 		/** @deprecated 21.0.0 */
365 365
 		$this->registerDeprecatedAlias('EncryptionKeyStorage', IStorage::class);
366
-		$this->registerService(IStorage::class, function (ContainerInterface $c) {
366
+		$this->registerService(IStorage::class, function(ContainerInterface $c) {
367 367
 			$view = new View();
368 368
 			$util = new Encryption\Util(
369 369
 				$view,
@@ -386,22 +386,22 @@  discard block
 block discarded – undo
386 386
 		/** @deprecated 19.0.0 */
387 387
 		$this->registerDeprecatedAlias('TagManager', \OCP\ITagManager::class);
388 388
 
389
-		$this->registerService('SystemTagManagerFactory', function (ContainerInterface $c) {
389
+		$this->registerService('SystemTagManagerFactory', function(ContainerInterface $c) {
390 390
 			/** @var \OCP\IConfig $config */
391 391
 			$config = $c->get(\OCP\IConfig::class);
392 392
 			$factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class);
393 393
 			return new $factoryClass($this);
394 394
 		});
395
-		$this->registerService(ISystemTagManager::class, function (ContainerInterface $c) {
395
+		$this->registerService(ISystemTagManager::class, function(ContainerInterface $c) {
396 396
 			return $c->get('SystemTagManagerFactory')->getManager();
397 397
 		});
398 398
 		/** @deprecated 19.0.0 */
399 399
 		$this->registerDeprecatedAlias('SystemTagManager', ISystemTagManager::class);
400 400
 
401
-		$this->registerService(ISystemTagObjectMapper::class, function (ContainerInterface $c) {
401
+		$this->registerService(ISystemTagObjectMapper::class, function(ContainerInterface $c) {
402 402
 			return $c->get('SystemTagManagerFactory')->getObjectMapper();
403 403
 		});
404
-		$this->registerService('RootFolder', function (ContainerInterface $c) {
404
+		$this->registerService('RootFolder', function(ContainerInterface $c) {
405 405
 			$manager = \OC\Files\Filesystem::getMountManager(null);
406 406
 			$view = new View();
407 407
 			$root = new Root(
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 
422 422
 			return $root;
423 423
 		});
424
-		$this->registerService(HookConnector::class, function (ContainerInterface $c) {
424
+		$this->registerService(HookConnector::class, function(ContainerInterface $c) {
425 425
 			return new HookConnector(
426 426
 				$c->get(IRootFolder::class),
427 427
 				new View(),
@@ -433,8 +433,8 @@  discard block
 block discarded – undo
433 433
 		/** @deprecated 19.0.0 */
434 434
 		$this->registerDeprecatedAlias('SystemTagObjectMapper', ISystemTagObjectMapper::class);
435 435
 
436
-		$this->registerService(IRootFolder::class, function (ContainerInterface $c) {
437
-			return new LazyRoot(function () use ($c) {
436
+		$this->registerService(IRootFolder::class, function(ContainerInterface $c) {
437
+			return new LazyRoot(function() use ($c) {
438 438
 				return $c->get('RootFolder');
439 439
 			});
440 440
 		});
@@ -445,44 +445,44 @@  discard block
 block discarded – undo
445 445
 		$this->registerDeprecatedAlias('UserManager', \OC\User\Manager::class);
446 446
 		$this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class);
447 447
 
448
-		$this->registerService(\OCP\IGroupManager::class, function (ContainerInterface $c) {
448
+		$this->registerService(\OCP\IGroupManager::class, function(ContainerInterface $c) {
449 449
 			$groupManager = new \OC\Group\Manager($this->get(IUserManager::class), $c->get(SymfonyAdapter::class), $this->get(ILogger::class));
450
-			$groupManager->listen('\OC\Group', 'preCreate', function ($gid) {
450
+			$groupManager->listen('\OC\Group', 'preCreate', function($gid) {
451 451
 				/** @var IEventDispatcher $dispatcher */
452 452
 				$dispatcher = $this->get(IEventDispatcher::class);
453 453
 				$dispatcher->dispatchTyped(new BeforeGroupCreatedEvent($gid));
454 454
 			});
455
-			$groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $group) {
455
+			$groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $group) {
456 456
 				/** @var IEventDispatcher $dispatcher */
457 457
 				$dispatcher = $this->get(IEventDispatcher::class);
458 458
 				$dispatcher->dispatchTyped(new GroupCreatedEvent($group));
459 459
 			});
460
-			$groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) {
460
+			$groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) {
461 461
 				/** @var IEventDispatcher $dispatcher */
462 462
 				$dispatcher = $this->get(IEventDispatcher::class);
463 463
 				$dispatcher->dispatchTyped(new BeforeGroupDeletedEvent($group));
464 464
 			});
465
-			$groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) {
465
+			$groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) {
466 466
 				/** @var IEventDispatcher $dispatcher */
467 467
 				$dispatcher = $this->get(IEventDispatcher::class);
468 468
 				$dispatcher->dispatchTyped(new GroupDeletedEvent($group));
469 469
 			});
470
-			$groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
470
+			$groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
471 471
 				/** @var IEventDispatcher $dispatcher */
472 472
 				$dispatcher = $this->get(IEventDispatcher::class);
473 473
 				$dispatcher->dispatchTyped(new BeforeUserAddedEvent($group, $user));
474 474
 			});
475
-			$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
475
+			$groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
476 476
 				/** @var IEventDispatcher $dispatcher */
477 477
 				$dispatcher = $this->get(IEventDispatcher::class);
478 478
 				$dispatcher->dispatchTyped(new UserAddedEvent($group, $user));
479 479
 			});
480
-			$groupManager->listen('\OC\Group', 'preRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) {
480
+			$groupManager->listen('\OC\Group', 'preRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) {
481 481
 				/** @var IEventDispatcher $dispatcher */
482 482
 				$dispatcher = $this->get(IEventDispatcher::class);
483 483
 				$dispatcher->dispatchTyped(new BeforeUserRemovedEvent($group, $user));
484 484
 			});
485
-			$groupManager->listen('\OC\Group', 'postRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) {
485
+			$groupManager->listen('\OC\Group', 'postRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) {
486 486
 				/** @var IEventDispatcher $dispatcher */
487 487
 				$dispatcher = $this->get(IEventDispatcher::class);
488 488
 				$dispatcher->dispatchTyped(new UserRemovedEvent($group, $user));
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 		/** @deprecated 19.0.0 */
493 493
 		$this->registerDeprecatedAlias('GroupManager', \OCP\IGroupManager::class);
494 494
 
495
-		$this->registerService(Store::class, function (ContainerInterface $c) {
495
+		$this->registerService(Store::class, function(ContainerInterface $c) {
496 496
 			$session = $c->get(ISession::class);
497 497
 			if (\OC::$server->get(SystemConfig::class)->getValue('installed', false)) {
498 498
 				$tokenProvider = $c->get(IProvider::class);
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 		$this->registerAlias(IStore::class, Store::class);
506 506
 		$this->registerAlias(IProvider::class, Authentication\Token\Manager::class);
507 507
 
508
-		$this->registerService(\OC\User\Session::class, function (Server $c) {
508
+		$this->registerService(\OC\User\Session::class, function(Server $c) {
509 509
 			$manager = $c->get(IUserManager::class);
510 510
 			$session = new \OC\Session\Memory('');
511 511
 			$timeFactory = new TimeFactory();
@@ -531,26 +531,26 @@  discard block
 block discarded – undo
531 531
 				$c->get(IEventDispatcher::class)
532 532
 			);
533 533
 			/** @deprecated 21.0.0 use BeforeUserCreatedEvent event with the IEventDispatcher instead */
534
-			$userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) {
534
+			$userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) {
535 535
 				\OC_Hook::emit('OC_User', 'pre_createUser', ['run' => true, 'uid' => $uid, 'password' => $password]);
536 536
 			});
537 537
 			/** @deprecated 21.0.0 use UserCreatedEvent event with the IEventDispatcher instead */
538
-			$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
538
+			$userSession->listen('\OC\User', 'postCreateUser', function($user, $password) {
539 539
 				/** @var \OC\User\User $user */
540 540
 				\OC_Hook::emit('OC_User', 'post_createUser', ['uid' => $user->getUID(), 'password' => $password]);
541 541
 			});
542 542
 			/** @deprecated 21.0.0 use BeforeUserDeletedEvent event with the IEventDispatcher instead */
543
-			$userSession->listen('\OC\User', 'preDelete', function ($user) use ($legacyDispatcher) {
543
+			$userSession->listen('\OC\User', 'preDelete', function($user) use ($legacyDispatcher) {
544 544
 				/** @var \OC\User\User $user */
545 545
 				\OC_Hook::emit('OC_User', 'pre_deleteUser', ['run' => true, 'uid' => $user->getUID()]);
546 546
 				$legacyDispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user));
547 547
 			});
548 548
 			/** @deprecated 21.0.0 use UserDeletedEvent event with the IEventDispatcher instead */
549
-			$userSession->listen('\OC\User', 'postDelete', function ($user) {
549
+			$userSession->listen('\OC\User', 'postDelete', function($user) {
550 550
 				/** @var \OC\User\User $user */
551 551
 				\OC_Hook::emit('OC_User', 'post_deleteUser', ['uid' => $user->getUID()]);
552 552
 			});
553
-			$userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) {
553
+			$userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) {
554 554
 				/** @var \OC\User\User $user */
555 555
 				\OC_Hook::emit('OC_User', 'pre_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]);
556 556
 
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 				$dispatcher = $this->get(IEventDispatcher::class);
559 559
 				$dispatcher->dispatchTyped(new BeforePasswordUpdatedEvent($user, $password, $recoveryPassword));
560 560
 			});
561
-			$userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) {
561
+			$userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) {
562 562
 				/** @var \OC\User\User $user */
563 563
 				\OC_Hook::emit('OC_User', 'post_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]);
564 564
 
@@ -566,14 +566,14 @@  discard block
 block discarded – undo
566 566
 				$dispatcher = $this->get(IEventDispatcher::class);
567 567
 				$dispatcher->dispatchTyped(new PasswordUpdatedEvent($user, $password, $recoveryPassword));
568 568
 			});
569
-			$userSession->listen('\OC\User', 'preLogin', function ($uid, $password) {
569
+			$userSession->listen('\OC\User', 'preLogin', function($uid, $password) {
570 570
 				\OC_Hook::emit('OC_User', 'pre_login', ['run' => true, 'uid' => $uid, 'password' => $password]);
571 571
 
572 572
 				/** @var IEventDispatcher $dispatcher */
573 573
 				$dispatcher = $this->get(IEventDispatcher::class);
574 574
 				$dispatcher->dispatchTyped(new BeforeUserLoggedInEvent($uid, $password));
575 575
 			});
576
-			$userSession->listen('\OC\User', 'postLogin', function ($user, $loginName, $password, $isTokenLogin) {
576
+			$userSession->listen('\OC\User', 'postLogin', function($user, $loginName, $password, $isTokenLogin) {
577 577
 				/** @var \OC\User\User $user */
578 578
 				\OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'loginName' => $loginName, 'password' => $password, 'isTokenLogin' => $isTokenLogin]);
579 579
 
@@ -581,12 +581,12 @@  discard block
 block discarded – undo
581 581
 				$dispatcher = $this->get(IEventDispatcher::class);
582 582
 				$dispatcher->dispatchTyped(new UserLoggedInEvent($user, $loginName, $password, $isTokenLogin));
583 583
 			});
584
-			$userSession->listen('\OC\User', 'preRememberedLogin', function ($uid) {
584
+			$userSession->listen('\OC\User', 'preRememberedLogin', function($uid) {
585 585
 				/** @var IEventDispatcher $dispatcher */
586 586
 				$dispatcher = $this->get(IEventDispatcher::class);
587 587
 				$dispatcher->dispatchTyped(new BeforeUserLoggedInWithCookieEvent($uid));
588 588
 			});
589
-			$userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) {
589
+			$userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) {
590 590
 				/** @var \OC\User\User $user */
591 591
 				\OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'password' => $password]);
592 592
 
@@ -594,19 +594,19 @@  discard block
 block discarded – undo
594 594
 				$dispatcher = $this->get(IEventDispatcher::class);
595 595
 				$dispatcher->dispatchTyped(new UserLoggedInWithCookieEvent($user, $password));
596 596
 			});
597
-			$userSession->listen('\OC\User', 'logout', function ($user) {
597
+			$userSession->listen('\OC\User', 'logout', function($user) {
598 598
 				\OC_Hook::emit('OC_User', 'logout', []);
599 599
 
600 600
 				/** @var IEventDispatcher $dispatcher */
601 601
 				$dispatcher = $this->get(IEventDispatcher::class);
602 602
 				$dispatcher->dispatchTyped(new BeforeUserLoggedOutEvent($user));
603 603
 			});
604
-			$userSession->listen('\OC\User', 'postLogout', function ($user) {
604
+			$userSession->listen('\OC\User', 'postLogout', function($user) {
605 605
 				/** @var IEventDispatcher $dispatcher */
606 606
 				$dispatcher = $this->get(IEventDispatcher::class);
607 607
 				$dispatcher->dispatchTyped(new UserLoggedOutEvent($user));
608 608
 			});
609
-			$userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) {
609
+			$userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) {
610 610
 				/** @var \OC\User\User $user */
611 611
 				\OC_Hook::emit('OC_User', 'changeUser', ['run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue]);
612 612
 
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
 		$this->registerDeprecatedAlias('AllConfig', \OC\AllConfig::class);
631 631
 		$this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class);
632 632
 
633
-		$this->registerService(\OC\SystemConfig::class, function ($c) use ($config) {
633
+		$this->registerService(\OC\SystemConfig::class, function($c) use ($config) {
634 634
 			return new \OC\SystemConfig($config);
635 635
 		});
636 636
 		/** @deprecated 19.0.0 */
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
 		$this->registerDeprecatedAlias('AppConfig', \OC\AppConfig::class);
641 641
 		$this->registerAlias(IAppConfig::class, \OC\AppConfig::class);
642 642
 
643
-		$this->registerService(IFactory::class, function (Server $c) {
643
+		$this->registerService(IFactory::class, function(Server $c) {
644 644
 			return new \OC\L10N\Factory(
645 645
 				$c->get(\OCP\IConfig::class),
646 646
 				$c->getRequest(),
@@ -660,13 +660,13 @@  discard block
 block discarded – undo
660 660
 		/** @deprecated 19.0.0 */
661 661
 		$this->registerDeprecatedAlias('CategoryFetcher', CategoryFetcher::class);
662 662
 
663
-		$this->registerService(ICache::class, function ($c) {
663
+		$this->registerService(ICache::class, function($c) {
664 664
 			return new Cache\File();
665 665
 		});
666 666
 		/** @deprecated 19.0.0 */
667 667
 		$this->registerDeprecatedAlias('UserCache', ICache::class);
668 668
 
669
-		$this->registerService(Factory::class, function (Server $c) {
669
+		$this->registerService(Factory::class, function(Server $c) {
670 670
 			$arrayCacheFactory = new \OC\Memcache\Factory('', $c->get(ILogger::class),
671 671
 				ArrayCache::class,
672 672
 				ArrayCache::class,
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
 				$version = implode(',', $v);
682 682
 				$instanceId = \OC_Util::getInstanceId();
683 683
 				$path = \OC::$SERVERROOT;
684
-				$prefix = md5($instanceId . '-' . $version . '-' . $path);
684
+				$prefix = md5($instanceId.'-'.$version.'-'.$path);
685 685
 				return new \OC\Memcache\Factory($prefix, $c->get(ILogger::class),
686 686
 					$config->getSystemValue('memcache.local', null),
687 687
 					$config->getSystemValue('memcache.distributed', null),
@@ -694,12 +694,12 @@  discard block
 block discarded – undo
694 694
 		$this->registerDeprecatedAlias('MemCacheFactory', Factory::class);
695 695
 		$this->registerAlias(ICacheFactory::class, Factory::class);
696 696
 
697
-		$this->registerService('RedisFactory', function (Server $c) {
697
+		$this->registerService('RedisFactory', function(Server $c) {
698 698
 			$systemConfig = $c->get(SystemConfig::class);
699 699
 			return new RedisFactory($systemConfig);
700 700
 		});
701 701
 
702
-		$this->registerService(\OCP\Activity\IManager::class, function (Server $c) {
702
+		$this->registerService(\OCP\Activity\IManager::class, function(Server $c) {
703 703
 			$l10n = $this->get(IFactory::class)->get('lib');
704 704
 			return new \OC\Activity\Manager(
705 705
 				$c->getRequest(),
@@ -712,14 +712,14 @@  discard block
 block discarded – undo
712 712
 		/** @deprecated 19.0.0 */
713 713
 		$this->registerDeprecatedAlias('ActivityManager', \OCP\Activity\IManager::class);
714 714
 
715
-		$this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) {
715
+		$this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) {
716 716
 			return new \OC\Activity\EventMerger(
717 717
 				$c->getL10N('lib')
718 718
 			);
719 719
 		});
720 720
 		$this->registerAlias(IValidator::class, Validator::class);
721 721
 
722
-		$this->registerService(AvatarManager::class, function (Server $c) {
722
+		$this->registerService(AvatarManager::class, function(Server $c) {
723 723
 			return new AvatarManager(
724 724
 				$c->get(IUserSession::class),
725 725
 				$c->get(\OC\User\Manager::class),
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
 		$this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class);
739 739
 		$this->registerAlias(\OCP\Support\Subscription\IRegistry::class, \OC\Support\Subscription\Registry::class);
740 740
 
741
-		$this->registerService(\OC\Log::class, function (Server $c) {
741
+		$this->registerService(\OC\Log::class, function(Server $c) {
742 742
 			$logType = $c->get(AllConfig::class)->getSystemValue('log_type', 'file');
743 743
 			$factory = new LogFactory($c, $this->get(SystemConfig::class));
744 744
 			$logger = $factory->get($logType);
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
 		// PSR-3 logger
753 753
 		$this->registerAlias(LoggerInterface::class, PsrLoggerAdapter::class);
754 754
 
755
-		$this->registerService(ILogFactory::class, function (Server $c) {
755
+		$this->registerService(ILogFactory::class, function(Server $c) {
756 756
 			return new LogFactory($c, $this->get(SystemConfig::class));
757 757
 		});
758 758
 
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
 		/** @deprecated 19.0.0 */
761 761
 		$this->registerDeprecatedAlias('JobList', IJobList::class);
762 762
 
763
-		$this->registerService(Router::class, function (Server $c) {
763
+		$this->registerService(Router::class, function(Server $c) {
764 764
 			$cacheFactory = $c->get(ICacheFactory::class);
765 765
 			$logger = $c->get(ILogger::class);
766 766
 			if ($cacheFactory->isLocalCacheAvailable()) {
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
 		/** @deprecated 19.0.0 */
779 779
 		$this->registerDeprecatedAlias('Search', ISearch::class);
780 780
 
781
-		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) {
781
+		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) {
782 782
 			return new \OC\Security\RateLimiting\Backend\MemoryCache(
783 783
 				$this->get(ICacheFactory::class),
784 784
 				new \OC\AppFramework\Utility\TimeFactory()
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
 		$this->registerDeprecatedAlias('CredentialsManager', ICredentialsManager::class);
803 803
 
804 804
 		$this->registerAlias(IDBConnection::class, ConnectionAdapter::class);
805
-		$this->registerService(Connection::class, function (Server $c) {
805
+		$this->registerService(Connection::class, function(Server $c) {
806 806
 			$systemConfig = $c->get(SystemConfig::class);
807 807
 			$factory = new \OC\DB\ConnectionFactory($systemConfig);
808 808
 			$type = $systemConfig->getValue('dbtype', 'sqlite');
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
 		$this->registerAlias(ICertificateManager::class, CertificateManager::class);
821 821
 		$this->registerAlias(IClientService::class, ClientService::class);
822 822
 		$this->registerDeprecatedAlias('HttpClientService', IClientService::class);
823
-		$this->registerService(IEventLogger::class, function (ContainerInterface $c) {
823
+		$this->registerService(IEventLogger::class, function(ContainerInterface $c) {
824 824
 			$eventLogger = new EventLogger();
825 825
 			if ($c->get(SystemConfig::class)->getValue('debug', false)) {
826 826
 				// In debug mode, module is being activated by default
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
 		/** @deprecated 19.0.0 */
832 832
 		$this->registerDeprecatedAlias('EventLogger', IEventLogger::class);
833 833
 
834
-		$this->registerService(IQueryLogger::class, function (ContainerInterface $c) {
834
+		$this->registerService(IQueryLogger::class, function(ContainerInterface $c) {
835 835
 			$queryLogger = new QueryLogger();
836 836
 			if ($c->get(SystemConfig::class)->getValue('debug', false)) {
837 837
 				// In debug mode, module is being activated by default
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 		$this->registerDeprecatedAlias('TempManager', TempManager::class);
847 847
 		$this->registerAlias(ITempManager::class, TempManager::class);
848 848
 
849
-		$this->registerService(AppManager::class, function (ContainerInterface $c) {
849
+		$this->registerService(AppManager::class, function(ContainerInterface $c) {
850 850
 			// TODO: use auto-wiring
851 851
 			return new \OC\App\AppManager(
852 852
 				$c->get(IUserSession::class),
@@ -866,7 +866,7 @@  discard block
 block discarded – undo
866 866
 		/** @deprecated 19.0.0 */
867 867
 		$this->registerDeprecatedAlias('DateTimeZone', IDateTimeZone::class);
868 868
 
869
-		$this->registerService(IDateTimeFormatter::class, function (Server $c) {
869
+		$this->registerService(IDateTimeFormatter::class, function(Server $c) {
870 870
 			$language = $c->get(\OCP\IConfig::class)->getUserValue($c->get(ISession::class)->get('user_id'), 'core', 'lang', null);
871 871
 
872 872
 			return new DateTimeFormatter(
@@ -877,7 +877,7 @@  discard block
 block discarded – undo
877 877
 		/** @deprecated 19.0.0 */
878 878
 		$this->registerDeprecatedAlias('DateTimeFormatter', IDateTimeFormatter::class);
879 879
 
880
-		$this->registerService(IUserMountCache::class, function (ContainerInterface $c) {
880
+		$this->registerService(IUserMountCache::class, function(ContainerInterface $c) {
881 881
 			$mountCache = new UserMountCache(
882 882
 				$c->get(IDBConnection::class),
883 883
 				$c->get(IUserManager::class),
@@ -890,7 +890,7 @@  discard block
 block discarded – undo
890 890
 		/** @deprecated 19.0.0 */
891 891
 		$this->registerDeprecatedAlias('UserMountCache', IUserMountCache::class);
892 892
 
893
-		$this->registerService(IMountProviderCollection::class, function (ContainerInterface $c) {
893
+		$this->registerService(IMountProviderCollection::class, function(ContainerInterface $c) {
894 894
 			$loader = \OC\Files\Filesystem::getLoader();
895 895
 			$mountCache = $c->get(IUserMountCache::class);
896 896
 			$manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache);
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
 
912 912
 		/** @deprecated 20.0.0 */
913 913
 		$this->registerDeprecatedAlias('IniWrapper', IniGetWrapper::class);
914
-		$this->registerService(IBus::class, function (ContainerInterface $c) {
914
+		$this->registerService(IBus::class, function(ContainerInterface $c) {
915 915
 			$busClass = $c->get(\OCP\IConfig::class)->getSystemValue('commandbus');
916 916
 			if ($busClass) {
917 917
 				[$app, $class] = explode('::', $busClass, 2);
@@ -931,7 +931,7 @@  discard block
 block discarded – undo
931 931
 		$this->registerDeprecatedAlias('TrustedDomainHelper', TrustedDomainHelper::class);
932 932
 		/** @deprecated 19.0.0 */
933 933
 		$this->registerDeprecatedAlias('Throttler', Throttler::class);
934
-		$this->registerService('IntegrityCodeChecker', function (ContainerInterface $c) {
934
+		$this->registerService('IntegrityCodeChecker', function(ContainerInterface $c) {
935 935
 			// IConfig and IAppManager requires a working database. This code
936 936
 			// might however be called when ownCloud is not yet setup.
937 937
 			if (\OC::$server->get(SystemConfig::class)->getValue('installed', false)) {
@@ -952,7 +952,7 @@  discard block
 block discarded – undo
952 952
 				$c->get(IMimeTypeDetector::class)
953 953
 			);
954 954
 		});
955
-		$this->registerService(\OCP\IRequest::class, function (ContainerInterface $c) {
955
+		$this->registerService(\OCP\IRequest::class, function(ContainerInterface $c) {
956 956
 			if (isset($this['urlParams'])) {
957 957
 				$urlParams = $this['urlParams'];
958 958
 			} else {
@@ -989,7 +989,7 @@  discard block
 block discarded – undo
989 989
 		/** @deprecated 19.0.0 */
990 990
 		$this->registerDeprecatedAlias('Request', \OCP\IRequest::class);
991 991
 
992
-		$this->registerService(IMailer::class, function (Server $c) {
992
+		$this->registerService(IMailer::class, function(Server $c) {
993 993
 			return new Mailer(
994 994
 				$c->get(\OCP\IConfig::class),
995 995
 				$c->get(ILogger::class),
@@ -1003,7 +1003,7 @@  discard block
 block discarded – undo
1003 1003
 		/** @deprecated 19.0.0 */
1004 1004
 		$this->registerDeprecatedAlias('Mailer', IMailer::class);
1005 1005
 
1006
-		$this->registerService('LDAPProvider', function (ContainerInterface $c) {
1006
+		$this->registerService('LDAPProvider', function(ContainerInterface $c) {
1007 1007
 			$config = $c->get(\OCP\IConfig::class);
1008 1008
 			$factoryClass = $config->getSystemValue('ldapProviderFactory', null);
1009 1009
 			if (is_null($factoryClass)) {
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
 			$factory = new $factoryClass($this);
1014 1014
 			return $factory->getLDAPProvider();
1015 1015
 		});
1016
-		$this->registerService(ILockingProvider::class, function (ContainerInterface $c) {
1016
+		$this->registerService(ILockingProvider::class, function(ContainerInterface $c) {
1017 1017
 			$ini = $c->get(IniGetWrapper::class);
1018 1018
 			$config = $c->get(\OCP\IConfig::class);
1019 1019
 			$ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time')));
@@ -1041,12 +1041,12 @@  discard block
 block discarded – undo
1041 1041
 		/** @deprecated 19.0.0 */
1042 1042
 		$this->registerDeprecatedAlias('MountManager', IMountManager::class);
1043 1043
 
1044
-		$this->registerService(IMimeTypeDetector::class, function (ContainerInterface $c) {
1044
+		$this->registerService(IMimeTypeDetector::class, function(ContainerInterface $c) {
1045 1045
 			return new \OC\Files\Type\Detection(
1046 1046
 				$c->get(IURLGenerator::class),
1047 1047
 				$c->get(ILogger::class),
1048 1048
 				\OC::$configDir,
1049
-				\OC::$SERVERROOT . '/resources/config/'
1049
+				\OC::$SERVERROOT.'/resources/config/'
1050 1050
 			);
1051 1051
 		});
1052 1052
 		/** @deprecated 19.0.0 */
@@ -1055,19 +1055,19 @@  discard block
 block discarded – undo
1055 1055
 		$this->registerAlias(IMimeTypeLoader::class, Loader::class);
1056 1056
 		/** @deprecated 19.0.0 */
1057 1057
 		$this->registerDeprecatedAlias('MimeTypeLoader', IMimeTypeLoader::class);
1058
-		$this->registerService(BundleFetcher::class, function () {
1058
+		$this->registerService(BundleFetcher::class, function() {
1059 1059
 			return new BundleFetcher($this->getL10N('lib'));
1060 1060
 		});
1061 1061
 		$this->registerAlias(\OCP\Notification\IManager::class, Manager::class);
1062 1062
 		/** @deprecated 19.0.0 */
1063 1063
 		$this->registerDeprecatedAlias('NotificationManager', \OCP\Notification\IManager::class);
1064 1064
 
1065
-		$this->registerService(CapabilitiesManager::class, function (ContainerInterface $c) {
1065
+		$this->registerService(CapabilitiesManager::class, function(ContainerInterface $c) {
1066 1066
 			$manager = new CapabilitiesManager($c->get(ILogger::class));
1067
-			$manager->registerCapability(function () use ($c) {
1067
+			$manager->registerCapability(function() use ($c) {
1068 1068
 				return new \OC\OCS\CoreCapabilities($c->get(\OCP\IConfig::class));
1069 1069
 			});
1070
-			$manager->registerCapability(function () use ($c) {
1070
+			$manager->registerCapability(function() use ($c) {
1071 1071
 				return $c->get(\OC\Security\Bruteforce\Capabilities::class);
1072 1072
 			});
1073 1073
 			return $manager;
@@ -1075,14 +1075,14 @@  discard block
 block discarded – undo
1075 1075
 		/** @deprecated 19.0.0 */
1076 1076
 		$this->registerDeprecatedAlias('CapabilitiesManager', CapabilitiesManager::class);
1077 1077
 
1078
-		$this->registerService(ICommentsManager::class, function (Server $c) {
1078
+		$this->registerService(ICommentsManager::class, function(Server $c) {
1079 1079
 			$config = $c->get(\OCP\IConfig::class);
1080 1080
 			$factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class);
1081 1081
 			/** @var \OCP\Comments\ICommentsManagerFactory $factory */
1082 1082
 			$factory = new $factoryClass($this);
1083 1083
 			$manager = $factory->getManager();
1084 1084
 
1085
-			$manager->registerDisplayNameResolver('user', function ($id) use ($c) {
1085
+			$manager->registerDisplayNameResolver('user', function($id) use ($c) {
1086 1086
 				$manager = $c->get(IUserManager::class);
1087 1087
 				$user = $manager->get($id);
1088 1088
 				if (is_null($user)) {
@@ -1100,7 +1100,7 @@  discard block
 block discarded – undo
1100 1100
 		$this->registerDeprecatedAlias('CommentsManager', ICommentsManager::class);
1101 1101
 
1102 1102
 		$this->registerAlias(\OC_Defaults::class, 'ThemingDefaults');
1103
-		$this->registerService('ThemingDefaults', function (Server $c) {
1103
+		$this->registerService('ThemingDefaults', function(Server $c) {
1104 1104
 			/*
1105 1105
 			 * Dark magic for autoloader.
1106 1106
 			 * If we do a class_exists it will try to load the class which will
@@ -1135,7 +1135,7 @@  discard block
 block discarded – undo
1135 1135
 			}
1136 1136
 			return new \OC_Defaults();
1137 1137
 		});
1138
-		$this->registerService(JSCombiner::class, function (Server $c) {
1138
+		$this->registerService(JSCombiner::class, function(Server $c) {
1139 1139
 			return new JSCombiner(
1140 1140
 				$c->getAppDataDir('js'),
1141 1141
 				$c->get(IURLGenerator::class),
@@ -1149,7 +1149,7 @@  discard block
 block discarded – undo
1149 1149
 		$this->registerDeprecatedAlias('EventDispatcher', \OC\EventDispatcher\SymfonyAdapter::class);
1150 1150
 		$this->registerAlias(EventDispatcherInterface::class, \OC\EventDispatcher\SymfonyAdapter::class);
1151 1151
 
1152
-		$this->registerService('CryptoWrapper', function (ContainerInterface $c) {
1152
+		$this->registerService('CryptoWrapper', function(ContainerInterface $c) {
1153 1153
 			// FIXME: Instantiiated here due to cyclic dependency
1154 1154
 			$request = new Request(
1155 1155
 				[
@@ -1176,14 +1176,14 @@  discard block
 block discarded – undo
1176 1176
 		});
1177 1177
 		/** @deprecated 19.0.0 */
1178 1178
 		$this->registerDeprecatedAlias('CsrfTokenManager', CsrfTokenManager::class);
1179
-		$this->registerService(SessionStorage::class, function (ContainerInterface $c) {
1179
+		$this->registerService(SessionStorage::class, function(ContainerInterface $c) {
1180 1180
 			return new SessionStorage($c->get(ISession::class));
1181 1181
 		});
1182 1182
 		$this->registerAlias(\OCP\Security\IContentSecurityPolicyManager::class, ContentSecurityPolicyManager::class);
1183 1183
 		/** @deprecated 19.0.0 */
1184 1184
 		$this->registerDeprecatedAlias('ContentSecurityPolicyManager', ContentSecurityPolicyManager::class);
1185 1185
 
1186
-		$this->registerService(\OCP\Share\IManager::class, function (IServerContainer $c) {
1186
+		$this->registerService(\OCP\Share\IManager::class, function(IServerContainer $c) {
1187 1187
 			$config = $c->get(\OCP\IConfig::class);
1188 1188
 			$factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class);
1189 1189
 			/** @var \OCP\Share\IProviderFactory $factory */
@@ -1213,7 +1213,7 @@  discard block
 block discarded – undo
1213 1213
 		/** @deprecated 19.0.0 */
1214 1214
 		$this->registerDeprecatedAlias('ShareManager', \OCP\Share\IManager::class);
1215 1215
 
1216
-		$this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function (Server $c) {
1216
+		$this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function(Server $c) {
1217 1217
 			$instance = new Collaboration\Collaborators\Search($c);
1218 1218
 
1219 1219
 			// register default plugins
@@ -1236,33 +1236,33 @@  discard block
 block discarded – undo
1236 1236
 
1237 1237
 		$this->registerDeprecatedAlias('SettingsManager', \OC\Settings\Manager::class);
1238 1238
 		$this->registerAlias(\OCP\Settings\IManager::class, \OC\Settings\Manager::class);
1239
-		$this->registerService(\OC\Files\AppData\Factory::class, function (ContainerInterface $c) {
1239
+		$this->registerService(\OC\Files\AppData\Factory::class, function(ContainerInterface $c) {
1240 1240
 			return new \OC\Files\AppData\Factory(
1241 1241
 				$c->get(IRootFolder::class),
1242 1242
 				$c->get(SystemConfig::class)
1243 1243
 			);
1244 1244
 		});
1245 1245
 
1246
-		$this->registerService('LockdownManager', function (ContainerInterface $c) {
1247
-			return new LockdownManager(function () use ($c) {
1246
+		$this->registerService('LockdownManager', function(ContainerInterface $c) {
1247
+			return new LockdownManager(function() use ($c) {
1248 1248
 				return $c->get(ISession::class);
1249 1249
 			});
1250 1250
 		});
1251 1251
 
1252
-		$this->registerService(\OCP\OCS\IDiscoveryService::class, function (ContainerInterface $c) {
1252
+		$this->registerService(\OCP\OCS\IDiscoveryService::class, function(ContainerInterface $c) {
1253 1253
 			return new DiscoveryService(
1254 1254
 				$c->get(ICacheFactory::class),
1255 1255
 				$c->get(IClientService::class)
1256 1256
 			);
1257 1257
 		});
1258 1258
 
1259
-		$this->registerService(ICloudIdManager::class, function (ContainerInterface $c) {
1259
+		$this->registerService(ICloudIdManager::class, function(ContainerInterface $c) {
1260 1260
 			return new CloudIdManager($c->get(\OCP\Contacts\IManager::class));
1261 1261
 		});
1262 1262
 
1263 1263
 		$this->registerAlias(\OCP\GlobalScale\IConfig::class, \OC\GlobalScale\Config::class);
1264 1264
 
1265
-		$this->registerService(ICloudFederationProviderManager::class, function (ContainerInterface $c) {
1265
+		$this->registerService(ICloudFederationProviderManager::class, function(ContainerInterface $c) {
1266 1266
 			return new CloudFederationProviderManager(
1267 1267
 				$c->get(IAppManager::class),
1268 1268
 				$c->get(IClientService::class),
@@ -1271,7 +1271,7 @@  discard block
 block discarded – undo
1271 1271
 			);
1272 1272
 		});
1273 1273
 
1274
-		$this->registerService(ICloudFederationFactory::class, function (Server $c) {
1274
+		$this->registerService(ICloudFederationFactory::class, function(Server $c) {
1275 1275
 			return new CloudFederationFactory();
1276 1276
 		});
1277 1277
 
@@ -1283,7 +1283,7 @@  discard block
 block discarded – undo
1283 1283
 		/** @deprecated 19.0.0 */
1284 1284
 		$this->registerDeprecatedAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class);
1285 1285
 
1286
-		$this->registerService(Defaults::class, function (Server $c) {
1286
+		$this->registerService(Defaults::class, function(Server $c) {
1287 1287
 			return new Defaults(
1288 1288
 				$c->getThemingDefaults()
1289 1289
 			);
@@ -1291,17 +1291,17 @@  discard block
 block discarded – undo
1291 1291
 		/** @deprecated 19.0.0 */
1292 1292
 		$this->registerDeprecatedAlias('Defaults', \OCP\Defaults::class);
1293 1293
 
1294
-		$this->registerService(\OCP\ISession::class, function (ContainerInterface $c) {
1294
+		$this->registerService(\OCP\ISession::class, function(ContainerInterface $c) {
1295 1295
 			return $c->get(\OCP\IUserSession::class)->getSession();
1296 1296
 		}, false);
1297 1297
 
1298
-		$this->registerService(IShareHelper::class, function (ContainerInterface $c) {
1298
+		$this->registerService(IShareHelper::class, function(ContainerInterface $c) {
1299 1299
 			return new ShareHelper(
1300 1300
 				$c->get(\OCP\Share\IManager::class)
1301 1301
 			);
1302 1302
 		});
1303 1303
 
1304
-		$this->registerService(Installer::class, function (ContainerInterface $c) {
1304
+		$this->registerService(Installer::class, function(ContainerInterface $c) {
1305 1305
 			return new Installer(
1306 1306
 				$c->get(AppFetcher::class),
1307 1307
 				$c->get(IClientService::class),
@@ -1312,11 +1312,11 @@  discard block
 block discarded – undo
1312 1312
 			);
1313 1313
 		});
1314 1314
 
1315
-		$this->registerService(IApiFactory::class, function (ContainerInterface $c) {
1315
+		$this->registerService(IApiFactory::class, function(ContainerInterface $c) {
1316 1316
 			return new ApiFactory($c->get(IClientService::class));
1317 1317
 		});
1318 1318
 
1319
-		$this->registerService(IInstanceFactory::class, function (ContainerInterface $c) {
1319
+		$this->registerService(IInstanceFactory::class, function(ContainerInterface $c) {
1320 1320
 			$memcacheFactory = $c->get(ICacheFactory::class);
1321 1321
 			return new InstanceFactory($memcacheFactory->createLocal('remoteinstance.'), $c->get(IClientService::class));
1322 1322
 		});
@@ -1373,7 +1373,7 @@  discard block
 block discarded – undo
1373 1373
 		$dispatcher = $this->get(SymfonyAdapter::class);
1374 1374
 
1375 1375
 		// Delete avatar on user deletion
1376
-		$dispatcher->addListener('OCP\IUser::preDelete', function (GenericEvent $e) {
1376
+		$dispatcher->addListener('OCP\IUser::preDelete', function(GenericEvent $e) {
1377 1377
 			$logger = $this->get(ILogger::class);
1378 1378
 			$manager = $this->getAvatarManager();
1379 1379
 			/** @var IUser $user */
@@ -1386,11 +1386,11 @@  discard block
 block discarded – undo
1386 1386
 				// no avatar to remove
1387 1387
 			} catch (\Exception $e) {
1388 1388
 				// Ignore exceptions
1389
-				$logger->info('Could not cleanup avatar of ' . $user->getUID());
1389
+				$logger->info('Could not cleanup avatar of '.$user->getUID());
1390 1390
 			}
1391 1391
 		});
1392 1392
 
1393
-		$dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) {
1393
+		$dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) {
1394 1394
 			$manager = $this->getAvatarManager();
1395 1395
 			/** @var IUser $user */
1396 1396
 			$user = $e->getSubject();
@@ -2281,11 +2281,11 @@  discard block
 block discarded – undo
2281 2281
 	}
2282 2282
 
2283 2283
 	private function registerDeprecatedAlias(string $alias, string $target) {
2284
-		$this->registerService($alias, function (ContainerInterface $container) use ($target, $alias) {
2284
+		$this->registerService($alias, function(ContainerInterface $container) use ($target, $alias) {
2285 2285
 			try {
2286 2286
 				/** @var ILogger $logger */
2287 2287
 				$logger = $container->get(ILogger::class);
2288
-				$logger->debug('The requested alias "' . $alias . '" is deprecated. Please request "' . $target . '" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']);
2288
+				$logger->debug('The requested alias "'.$alias.'" is deprecated. Please request "'.$target.'" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']);
2289 2289
 			} catch (ContainerExceptionInterface $e) {
2290 2290
 				// Could not get logger. Continue
2291 2291
 			}
Please login to merge, or discard this patch.