Passed
Push — master ( b07a8f...789bb0 )
by Roeland
15:45 queued 10s
created
lib/private/Http/Client/Client.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
 		$options['nextcloud']['allow_local_address'] = $this->isLocalAddressAllowed($options);
85 85
 		if ($options['nextcloud']['allow_local_address'] === false) {
86
-			$onRedirectFunction = function (
86
+			$onRedirectFunction = function(
87 87
 				\Psr\Http\Message\RequestInterface $request,
88 88
 				\Psr\Http\Message\ResponseInterface $response,
89 89
 				\Psr\Http\Message\UriInterface $uri
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 		// $this->certificateManager->getAbsoluteBundlePath() tries to instantiate
128 128
 		// a view
129 129
 		if ($this->config->getSystemValue('installed', false) === false) {
130
-			return \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
130
+			return \OC::$SERVERROOT.'/resources/config/ca-bundle.crt';
131 131
 		}
132 132
 
133 133
 		return $this->certificateManager->getAbsoluteBundlePath();
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
 		$proxyUserPwd = $this->config->getSystemValue('proxyuserpwd', '');
159 159
 		if ($proxyUserPwd !== '' && $proxyUserPwd !== null) {
160
-			$proxyHost = $proxyUserPwd . '@' . $proxyHost;
160
+			$proxyHost = $proxyUserPwd.'@'.$proxyHost;
161 161
 		}
162 162
 
163 163
 		$proxy = [
Please login to merge, or discard this patch.
lib/private/Http/Client/NegativeDnsCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 	}
39 39
 
40 40
 	private function createCacheKey(string $domain, int $type) : string {
41
-		return $domain . "-" . (string)$type;
41
+		return $domain."-".(string) $type;
42 42
 	}
43 43
 
44 44
 	public function setNegativeCacheForDnsType(string $domain, int $type, int $ttl) : void {
Please login to merge, or discard this patch.
lib/private/Http/Client/LocalAddressChecker.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,13 +38,13 @@  discard block
 block discarded – undo
38 38
 	}
39 39
 
40 40
 	public function ThrowIfLocalIp(string $ip) : void {
41
-		if ((bool)filter_var($ip, FILTER_VALIDATE_IP) && !filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
41
+		if ((bool) filter_var($ip, FILTER_VALIDATE_IP) && !filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
42 42
 			$this->logger->warning("Host $ip was not connected to because it violates local access rules");
43 43
 			throw new LocalServerException('Host violates local access rules');
44 44
 		}
45 45
 
46 46
 		// Also check for IPv6 IPv4 nesting, because that's not covered by filter_var
47
-		if ((bool)filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) && substr_count($ip, '.') > 0) {
47
+		if ((bool) filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) && substr_count($ip, '.') > 0) {
48 48
 			$delimiter = strrpos($ip, ':'); // Get last colon
49 49
 			$ipv4Address = substr($ip, $delimiter + 1);
50 50
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		}
76 76
 
77 77
 		// Disallow hostname only
78
-		if (substr_count($host, '.') === 0 && !(bool)filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
78
+		if (substr_count($host, '.') === 0 && !(bool) filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
79 79
 			$this->logger->warning("Host $host was not connected to because it violates local access rules");
80 80
 			throw new LocalServerException('Host violates local access rules');
81 81
 		}
Please login to merge, or discard this patch.
lib/private/Http/Client/DnsPinMiddleware.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 	}
91 91
 
92 92
 	public function addDnsPinning() {
93
-		return function (callable $handler) {
94
-			return function (
93
+		return function(callable $handler) {
94
+			return function(
95 95
 				RequestInterface $request,
96 96
 				array $options
97 97
 			) use ($handler) {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 					return $handler($request, $options);
100 100
 				}
101 101
 
102
-				$hostName = (string)$request->getUri()->getHost();
102
+				$hostName = (string) $request->getUri()->getHost();
103 103
 				$port = $request->getUri()->getPort();
104 104
 
105 105
 				$ports = [
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 				];
109 109
 
110 110
 				if ($port !== null) {
111
-					$ports[] = (string)$port;
111
+					$ports[] = (string) $port;
112 112
 				}
113 113
 
114 114
 				$targetIps = $this->dnsResolve($hostName, 0);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 					$this->localAddressChecker->ThrowIfLocalIp($ip);
118 118
 
119 119
 					foreach ($ports as $port) {
120
-						$curlEntry = $hostName . ':' . $port . ':' . $ip;
120
+						$curlEntry = $hostName.':'.$port.':'.$ip;
121 121
 						$options['curl'][CURLOPT_RESOLVE][] = $curlEntry;
122 122
 					}
123 123
 				}
Please login to merge, or discard this patch.
lib/private/Server.php 1 patch
Spacing   +101 added lines, -101 removed lines patch added patch discarded remove patch
@@ -274,10 +274,10 @@  discard block
 block discarded – undo
274 274
 		$this->registerParameter('isCLI', \OC::$CLI);
275 275
 		$this->registerParameter('serverRoot', \OC::$SERVERROOT);
276 276
 
277
-		$this->registerService(ContainerInterface::class, function (ContainerInterface $c) {
277
+		$this->registerService(ContainerInterface::class, function(ContainerInterface $c) {
278 278
 			return $c;
279 279
 		});
280
-		$this->registerService(\OCP\IServerContainer::class, function (ContainerInterface $c) {
280
+		$this->registerService(\OCP\IServerContainer::class, function(ContainerInterface $c) {
281 281
 			return $c;
282 282
 		});
283 283
 
@@ -302,11 +302,11 @@  discard block
 block discarded – undo
302 302
 
303 303
 		$this->registerAlias(IActionFactory::class, ActionFactory::class);
304 304
 
305
-		$this->registerService(View::class, function (Server $c) {
305
+		$this->registerService(View::class, function(Server $c) {
306 306
 			return new View();
307 307
 		}, false);
308 308
 
309
-		$this->registerService(IPreview::class, function (ContainerInterface $c) {
309
+		$this->registerService(IPreview::class, function(ContainerInterface $c) {
310 310
 			return new PreviewManager(
311 311
 				$c->get(\OCP\IConfig::class),
312 312
 				$c->get(IRootFolder::class),
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 		/** @deprecated 19.0.0 */
323 323
 		$this->registerDeprecatedAlias('PreviewManager', IPreview::class);
324 324
 
325
-		$this->registerService(\OC\Preview\Watcher::class, function (ContainerInterface $c) {
325
+		$this->registerService(\OC\Preview\Watcher::class, function(ContainerInterface $c) {
326 326
 			return new \OC\Preview\Watcher(
327 327
 				new \OC\Preview\Storage\Root(
328 328
 					$c->get(IRootFolder::class),
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 			);
332 332
 		});
333 333
 
334
-		$this->registerService(\OCP\Encryption\IManager::class, function (Server $c) {
334
+		$this->registerService(\OCP\Encryption\IManager::class, function(Server $c) {
335 335
 			$view = new View();
336 336
 			$util = new Encryption\Util(
337 337
 				$view,
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 
354 354
 		/** @deprecated 21.0.0 */
355 355
 		$this->registerDeprecatedAlias('EncryptionFileHelper', IFile::class);
356
-		$this->registerService(IFile::class, function (ContainerInterface $c) {
356
+		$this->registerService(IFile::class, function(ContainerInterface $c) {
357 357
 			$util = new Encryption\Util(
358 358
 				new View(),
359 359
 				$c->get(IUserManager::class),
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 
370 370
 		/** @deprecated 21.0.0 */
371 371
 		$this->registerDeprecatedAlias('EncryptionKeyStorage', IStorage::class);
372
-		$this->registerService(IStorage::class, function (ContainerInterface $c) {
372
+		$this->registerService(IStorage::class, function(ContainerInterface $c) {
373 373
 			$view = new View();
374 374
 			$util = new Encryption\Util(
375 375
 				$view,
@@ -392,22 +392,22 @@  discard block
 block discarded – undo
392 392
 		/** @deprecated 19.0.0 */
393 393
 		$this->registerDeprecatedAlias('TagManager', \OCP\ITagManager::class);
394 394
 
395
-		$this->registerService('SystemTagManagerFactory', function (ContainerInterface $c) {
395
+		$this->registerService('SystemTagManagerFactory', function(ContainerInterface $c) {
396 396
 			/** @var \OCP\IConfig $config */
397 397
 			$config = $c->get(\OCP\IConfig::class);
398 398
 			$factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class);
399 399
 			return new $factoryClass($this);
400 400
 		});
401
-		$this->registerService(ISystemTagManager::class, function (ContainerInterface $c) {
401
+		$this->registerService(ISystemTagManager::class, function(ContainerInterface $c) {
402 402
 			return $c->get('SystemTagManagerFactory')->getManager();
403 403
 		});
404 404
 		/** @deprecated 19.0.0 */
405 405
 		$this->registerDeprecatedAlias('SystemTagManager', ISystemTagManager::class);
406 406
 
407
-		$this->registerService(ISystemTagObjectMapper::class, function (ContainerInterface $c) {
407
+		$this->registerService(ISystemTagObjectMapper::class, function(ContainerInterface $c) {
408 408
 			return $c->get('SystemTagManagerFactory')->getObjectMapper();
409 409
 		});
410
-		$this->registerService('RootFolder', function (ContainerInterface $c) {
410
+		$this->registerService('RootFolder', function(ContainerInterface $c) {
411 411
 			$manager = \OC\Files\Filesystem::getMountManager(null);
412 412
 			$view = new View();
413 413
 			$root = new Root(
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
 
428 428
 			return $root;
429 429
 		});
430
-		$this->registerService(HookConnector::class, function (ContainerInterface $c) {
430
+		$this->registerService(HookConnector::class, function(ContainerInterface $c) {
431 431
 			return new HookConnector(
432 432
 				$c->get(IRootFolder::class),
433 433
 				new View(),
@@ -439,8 +439,8 @@  discard block
 block discarded – undo
439 439
 		/** @deprecated 19.0.0 */
440 440
 		$this->registerDeprecatedAlias('SystemTagObjectMapper', ISystemTagObjectMapper::class);
441 441
 
442
-		$this->registerService(IRootFolder::class, function (ContainerInterface $c) {
443
-			return new LazyRoot(function () use ($c) {
442
+		$this->registerService(IRootFolder::class, function(ContainerInterface $c) {
443
+			return new LazyRoot(function() use ($c) {
444 444
 				return $c->get('RootFolder');
445 445
 			});
446 446
 		});
@@ -451,44 +451,44 @@  discard block
 block discarded – undo
451 451
 		$this->registerDeprecatedAlias('UserManager', \OC\User\Manager::class);
452 452
 		$this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class);
453 453
 
454
-		$this->registerService(\OCP\IGroupManager::class, function (ContainerInterface $c) {
454
+		$this->registerService(\OCP\IGroupManager::class, function(ContainerInterface $c) {
455 455
 			$groupManager = new \OC\Group\Manager($this->get(IUserManager::class), $c->get(SymfonyAdapter::class), $this->get(ILogger::class));
456
-			$groupManager->listen('\OC\Group', 'preCreate', function ($gid) {
456
+			$groupManager->listen('\OC\Group', 'preCreate', function($gid) {
457 457
 				/** @var IEventDispatcher $dispatcher */
458 458
 				$dispatcher = $this->get(IEventDispatcher::class);
459 459
 				$dispatcher->dispatchTyped(new BeforeGroupCreatedEvent($gid));
460 460
 			});
461
-			$groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $group) {
461
+			$groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $group) {
462 462
 				/** @var IEventDispatcher $dispatcher */
463 463
 				$dispatcher = $this->get(IEventDispatcher::class);
464 464
 				$dispatcher->dispatchTyped(new GroupCreatedEvent($group));
465 465
 			});
466
-			$groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) {
466
+			$groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) {
467 467
 				/** @var IEventDispatcher $dispatcher */
468 468
 				$dispatcher = $this->get(IEventDispatcher::class);
469 469
 				$dispatcher->dispatchTyped(new BeforeGroupDeletedEvent($group));
470 470
 			});
471
-			$groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) {
471
+			$groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) {
472 472
 				/** @var IEventDispatcher $dispatcher */
473 473
 				$dispatcher = $this->get(IEventDispatcher::class);
474 474
 				$dispatcher->dispatchTyped(new GroupDeletedEvent($group));
475 475
 			});
476
-			$groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
476
+			$groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
477 477
 				/** @var IEventDispatcher $dispatcher */
478 478
 				$dispatcher = $this->get(IEventDispatcher::class);
479 479
 				$dispatcher->dispatchTyped(new BeforeUserAddedEvent($group, $user));
480 480
 			});
481
-			$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
481
+			$groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
482 482
 				/** @var IEventDispatcher $dispatcher */
483 483
 				$dispatcher = $this->get(IEventDispatcher::class);
484 484
 				$dispatcher->dispatchTyped(new UserAddedEvent($group, $user));
485 485
 			});
486
-			$groupManager->listen('\OC\Group', 'preRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) {
486
+			$groupManager->listen('\OC\Group', 'preRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) {
487 487
 				/** @var IEventDispatcher $dispatcher */
488 488
 				$dispatcher = $this->get(IEventDispatcher::class);
489 489
 				$dispatcher->dispatchTyped(new BeforeUserRemovedEvent($group, $user));
490 490
 			});
491
-			$groupManager->listen('\OC\Group', 'postRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) {
491
+			$groupManager->listen('\OC\Group', 'postRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) {
492 492
 				/** @var IEventDispatcher $dispatcher */
493 493
 				$dispatcher = $this->get(IEventDispatcher::class);
494 494
 				$dispatcher->dispatchTyped(new UserRemovedEvent($group, $user));
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
 		/** @deprecated 19.0.0 */
499 499
 		$this->registerDeprecatedAlias('GroupManager', \OCP\IGroupManager::class);
500 500
 
501
-		$this->registerService(Store::class, function (ContainerInterface $c) {
501
+		$this->registerService(Store::class, function(ContainerInterface $c) {
502 502
 			$session = $c->get(ISession::class);
503 503
 			if (\OC::$server->get(SystemConfig::class)->getValue('installed', false)) {
504 504
 				$tokenProvider = $c->get(IProvider::class);
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
 		$this->registerAlias(IStore::class, Store::class);
512 512
 		$this->registerAlias(IProvider::class, Authentication\Token\Manager::class);
513 513
 
514
-		$this->registerService(\OC\User\Session::class, function (Server $c) {
514
+		$this->registerService(\OC\User\Session::class, function(Server $c) {
515 515
 			$manager = $c->get(IUserManager::class);
516 516
 			$session = new \OC\Session\Memory('');
517 517
 			$timeFactory = new TimeFactory();
@@ -537,26 +537,26 @@  discard block
 block discarded – undo
537 537
 				$c->get(IEventDispatcher::class)
538 538
 			);
539 539
 			/** @deprecated 21.0.0 use BeforeUserCreatedEvent event with the IEventDispatcher instead */
540
-			$userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) {
540
+			$userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) {
541 541
 				\OC_Hook::emit('OC_User', 'pre_createUser', ['run' => true, 'uid' => $uid, 'password' => $password]);
542 542
 			});
543 543
 			/** @deprecated 21.0.0 use UserCreatedEvent event with the IEventDispatcher instead */
544
-			$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
544
+			$userSession->listen('\OC\User', 'postCreateUser', function($user, $password) {
545 545
 				/** @var \OC\User\User $user */
546 546
 				\OC_Hook::emit('OC_User', 'post_createUser', ['uid' => $user->getUID(), 'password' => $password]);
547 547
 			});
548 548
 			/** @deprecated 21.0.0 use BeforeUserDeletedEvent event with the IEventDispatcher instead */
549
-			$userSession->listen('\OC\User', 'preDelete', function ($user) use ($legacyDispatcher) {
549
+			$userSession->listen('\OC\User', 'preDelete', function($user) use ($legacyDispatcher) {
550 550
 				/** @var \OC\User\User $user */
551 551
 				\OC_Hook::emit('OC_User', 'pre_deleteUser', ['run' => true, 'uid' => $user->getUID()]);
552 552
 				$legacyDispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user));
553 553
 			});
554 554
 			/** @deprecated 21.0.0 use UserDeletedEvent event with the IEventDispatcher instead */
555
-			$userSession->listen('\OC\User', 'postDelete', function ($user) {
555
+			$userSession->listen('\OC\User', 'postDelete', function($user) {
556 556
 				/** @var \OC\User\User $user */
557 557
 				\OC_Hook::emit('OC_User', 'post_deleteUser', ['uid' => $user->getUID()]);
558 558
 			});
559
-			$userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) {
559
+			$userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) {
560 560
 				/** @var \OC\User\User $user */
561 561
 				\OC_Hook::emit('OC_User', 'pre_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]);
562 562
 
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
 				$dispatcher = $this->get(IEventDispatcher::class);
565 565
 				$dispatcher->dispatchTyped(new BeforePasswordUpdatedEvent($user, $password, $recoveryPassword));
566 566
 			});
567
-			$userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) {
567
+			$userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) {
568 568
 				/** @var \OC\User\User $user */
569 569
 				\OC_Hook::emit('OC_User', 'post_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]);
570 570
 
@@ -572,14 +572,14 @@  discard block
 block discarded – undo
572 572
 				$dispatcher = $this->get(IEventDispatcher::class);
573 573
 				$dispatcher->dispatchTyped(new PasswordUpdatedEvent($user, $password, $recoveryPassword));
574 574
 			});
575
-			$userSession->listen('\OC\User', 'preLogin', function ($uid, $password) {
575
+			$userSession->listen('\OC\User', 'preLogin', function($uid, $password) {
576 576
 				\OC_Hook::emit('OC_User', 'pre_login', ['run' => true, 'uid' => $uid, 'password' => $password]);
577 577
 
578 578
 				/** @var IEventDispatcher $dispatcher */
579 579
 				$dispatcher = $this->get(IEventDispatcher::class);
580 580
 				$dispatcher->dispatchTyped(new BeforeUserLoggedInEvent($uid, $password));
581 581
 			});
582
-			$userSession->listen('\OC\User', 'postLogin', function ($user, $loginName, $password, $isTokenLogin) {
582
+			$userSession->listen('\OC\User', 'postLogin', function($user, $loginName, $password, $isTokenLogin) {
583 583
 				/** @var \OC\User\User $user */
584 584
 				\OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'loginName' => $loginName, 'password' => $password, 'isTokenLogin' => $isTokenLogin]);
585 585
 
@@ -587,12 +587,12 @@  discard block
 block discarded – undo
587 587
 				$dispatcher = $this->get(IEventDispatcher::class);
588 588
 				$dispatcher->dispatchTyped(new UserLoggedInEvent($user, $loginName, $password, $isTokenLogin));
589 589
 			});
590
-			$userSession->listen('\OC\User', 'preRememberedLogin', function ($uid) {
590
+			$userSession->listen('\OC\User', 'preRememberedLogin', function($uid) {
591 591
 				/** @var IEventDispatcher $dispatcher */
592 592
 				$dispatcher = $this->get(IEventDispatcher::class);
593 593
 				$dispatcher->dispatchTyped(new BeforeUserLoggedInWithCookieEvent($uid));
594 594
 			});
595
-			$userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) {
595
+			$userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) {
596 596
 				/** @var \OC\User\User $user */
597 597
 				\OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'password' => $password]);
598 598
 
@@ -600,19 +600,19 @@  discard block
 block discarded – undo
600 600
 				$dispatcher = $this->get(IEventDispatcher::class);
601 601
 				$dispatcher->dispatchTyped(new UserLoggedInWithCookieEvent($user, $password));
602 602
 			});
603
-			$userSession->listen('\OC\User', 'logout', function ($user) {
603
+			$userSession->listen('\OC\User', 'logout', function($user) {
604 604
 				\OC_Hook::emit('OC_User', 'logout', []);
605 605
 
606 606
 				/** @var IEventDispatcher $dispatcher */
607 607
 				$dispatcher = $this->get(IEventDispatcher::class);
608 608
 				$dispatcher->dispatchTyped(new BeforeUserLoggedOutEvent($user));
609 609
 			});
610
-			$userSession->listen('\OC\User', 'postLogout', function ($user) {
610
+			$userSession->listen('\OC\User', 'postLogout', function($user) {
611 611
 				/** @var IEventDispatcher $dispatcher */
612 612
 				$dispatcher = $this->get(IEventDispatcher::class);
613 613
 				$dispatcher->dispatchTyped(new UserLoggedOutEvent($user));
614 614
 			});
615
-			$userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) {
615
+			$userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) {
616 616
 				/** @var \OC\User\User $user */
617 617
 				\OC_Hook::emit('OC_User', 'changeUser', ['run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue]);
618 618
 
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
 		$this->registerDeprecatedAlias('AllConfig', \OC\AllConfig::class);
637 637
 		$this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class);
638 638
 
639
-		$this->registerService(\OC\SystemConfig::class, function ($c) use ($config) {
639
+		$this->registerService(\OC\SystemConfig::class, function($c) use ($config) {
640 640
 			return new \OC\SystemConfig($config);
641 641
 		});
642 642
 		/** @deprecated 19.0.0 */
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
 		$this->registerDeprecatedAlias('AppConfig', \OC\AppConfig::class);
647 647
 		$this->registerAlias(IAppConfig::class, \OC\AppConfig::class);
648 648
 
649
-		$this->registerService(IFactory::class, function (Server $c) {
649
+		$this->registerService(IFactory::class, function(Server $c) {
650 650
 			return new \OC\L10N\Factory(
651 651
 				$c->get(\OCP\IConfig::class),
652 652
 				$c->getRequest(),
@@ -666,13 +666,13 @@  discard block
 block discarded – undo
666 666
 		/** @deprecated 19.0.0 */
667 667
 		$this->registerDeprecatedAlias('CategoryFetcher', CategoryFetcher::class);
668 668
 
669
-		$this->registerService(ICache::class, function ($c) {
669
+		$this->registerService(ICache::class, function($c) {
670 670
 			return new Cache\File();
671 671
 		});
672 672
 		/** @deprecated 19.0.0 */
673 673
 		$this->registerDeprecatedAlias('UserCache', ICache::class);
674 674
 
675
-		$this->registerService(Factory::class, function (Server $c) {
675
+		$this->registerService(Factory::class, function(Server $c) {
676 676
 			$arrayCacheFactory = new \OC\Memcache\Factory('', $c->get(ILogger::class),
677 677
 				ArrayCache::class,
678 678
 				ArrayCache::class,
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
 				$version = implode(',', $v);
688 688
 				$instanceId = \OC_Util::getInstanceId();
689 689
 				$path = \OC::$SERVERROOT;
690
-				$prefix = md5($instanceId . '-' . $version . '-' . $path);
690
+				$prefix = md5($instanceId.'-'.$version.'-'.$path);
691 691
 				return new \OC\Memcache\Factory($prefix, $c->get(ILogger::class),
692 692
 					$config->getSystemValue('memcache.local', null),
693 693
 					$config->getSystemValue('memcache.distributed', null),
@@ -700,12 +700,12 @@  discard block
 block discarded – undo
700 700
 		$this->registerDeprecatedAlias('MemCacheFactory', Factory::class);
701 701
 		$this->registerAlias(ICacheFactory::class, Factory::class);
702 702
 
703
-		$this->registerService('RedisFactory', function (Server $c) {
703
+		$this->registerService('RedisFactory', function(Server $c) {
704 704
 			$systemConfig = $c->get(SystemConfig::class);
705 705
 			return new RedisFactory($systemConfig);
706 706
 		});
707 707
 
708
-		$this->registerService(\OCP\Activity\IManager::class, function (Server $c) {
708
+		$this->registerService(\OCP\Activity\IManager::class, function(Server $c) {
709 709
 			$l10n = $this->get(IFactory::class)->get('lib');
710 710
 			return new \OC\Activity\Manager(
711 711
 				$c->getRequest(),
@@ -718,14 +718,14 @@  discard block
 block discarded – undo
718 718
 		/** @deprecated 19.0.0 */
719 719
 		$this->registerDeprecatedAlias('ActivityManager', \OCP\Activity\IManager::class);
720 720
 
721
-		$this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) {
721
+		$this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) {
722 722
 			return new \OC\Activity\EventMerger(
723 723
 				$c->getL10N('lib')
724 724
 			);
725 725
 		});
726 726
 		$this->registerAlias(IValidator::class, Validator::class);
727 727
 
728
-		$this->registerService(AvatarManager::class, function (Server $c) {
728
+		$this->registerService(AvatarManager::class, function(Server $c) {
729 729
 			return new AvatarManager(
730 730
 				$c->get(IUserSession::class),
731 731
 				$c->get(\OC\User\Manager::class),
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
 		$this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class);
745 745
 		$this->registerAlias(\OCP\Support\Subscription\IRegistry::class, \OC\Support\Subscription\Registry::class);
746 746
 
747
-		$this->registerService(\OC\Log::class, function (Server $c) {
747
+		$this->registerService(\OC\Log::class, function(Server $c) {
748 748
 			$logType = $c->get(AllConfig::class)->getSystemValue('log_type', 'file');
749 749
 			$factory = new LogFactory($c, $this->get(SystemConfig::class));
750 750
 			$logger = $factory->get($logType);
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
 		// PSR-3 logger
759 759
 		$this->registerAlias(LoggerInterface::class, PsrLoggerAdapter::class);
760 760
 
761
-		$this->registerService(ILogFactory::class, function (Server $c) {
761
+		$this->registerService(ILogFactory::class, function(Server $c) {
762 762
 			return new LogFactory($c, $this->get(SystemConfig::class));
763 763
 		});
764 764
 
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
 		/** @deprecated 19.0.0 */
767 767
 		$this->registerDeprecatedAlias('JobList', IJobList::class);
768 768
 
769
-		$this->registerService(Router::class, function (Server $c) {
769
+		$this->registerService(Router::class, function(Server $c) {
770 770
 			$cacheFactory = $c->get(ICacheFactory::class);
771 771
 			$logger = $c->get(ILogger::class);
772 772
 			if ($cacheFactory->isLocalCacheAvailable()) {
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
 		/** @deprecated 19.0.0 */
785 785
 		$this->registerDeprecatedAlias('Search', ISearch::class);
786 786
 
787
-		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) {
787
+		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) {
788 788
 			return new \OC\Security\RateLimiting\Backend\MemoryCache(
789 789
 				$this->get(ICacheFactory::class),
790 790
 				new \OC\AppFramework\Utility\TimeFactory()
@@ -808,7 +808,7 @@  discard block
 block discarded – undo
808 808
 		$this->registerDeprecatedAlias('CredentialsManager', ICredentialsManager::class);
809 809
 
810 810
 		$this->registerAlias(IDBConnection::class, ConnectionAdapter::class);
811
-		$this->registerService(Connection::class, function (Server $c) {
811
+		$this->registerService(Connection::class, function(Server $c) {
812 812
 			$systemConfig = $c->get(SystemConfig::class);
813 813
 			$factory = new \OC\DB\ConnectionFactory($systemConfig);
814 814
 			$type = $systemConfig->getValue('dbtype', 'sqlite');
@@ -825,24 +825,24 @@  discard block
 block discarded – undo
825 825
 
826 826
 		$this->registerAlias(ICertificateManager::class, CertificateManager::class);
827 827
 		$this->registerAlias(IClientService::class, ClientService::class);
828
-		$this->registerService(LocalAddressChecker::class, function (ContainerInterface $c) {
828
+		$this->registerService(LocalAddressChecker::class, function(ContainerInterface $c) {
829 829
 			return new LocalAddressChecker(
830 830
 				$c->get(ILogger::class),
831 831
 			);
832 832
 		});
833
-		$this->registerService(NegativeDnsCache::class, function (ContainerInterface $c) {
833
+		$this->registerService(NegativeDnsCache::class, function(ContainerInterface $c) {
834 834
 			return new NegativeDnsCache(
835 835
 				$c->get(ICacheFactory::class),
836 836
 			);
837 837
 		});
838
-		$this->registerService(DnsPinMiddleware::class, function (ContainerInterface $c) {
838
+		$this->registerService(DnsPinMiddleware::class, function(ContainerInterface $c) {
839 839
 			return new DnsPinMiddleware(
840 840
 				$c->get(NegativeDnsCache::class),
841 841
 				$c->get(LocalAddressChecker::class)
842 842
 			);
843 843
 		});
844 844
 		$this->registerDeprecatedAlias('HttpClientService', IClientService::class);
845
-		$this->registerService(IEventLogger::class, function (ContainerInterface $c) {
845
+		$this->registerService(IEventLogger::class, function(ContainerInterface $c) {
846 846
 			$eventLogger = new EventLogger();
847 847
 			if ($c->get(SystemConfig::class)->getValue('debug', false)) {
848 848
 				// In debug mode, module is being activated by default
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
 		/** @deprecated 19.0.0 */
854 854
 		$this->registerDeprecatedAlias('EventLogger', IEventLogger::class);
855 855
 
856
-		$this->registerService(IQueryLogger::class, function (ContainerInterface $c) {
856
+		$this->registerService(IQueryLogger::class, function(ContainerInterface $c) {
857 857
 			$queryLogger = new QueryLogger();
858 858
 			if ($c->get(SystemConfig::class)->getValue('debug', false)) {
859 859
 				// In debug mode, module is being activated by default
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
 		$this->registerDeprecatedAlias('TempManager', TempManager::class);
869 869
 		$this->registerAlias(ITempManager::class, TempManager::class);
870 870
 
871
-		$this->registerService(AppManager::class, function (ContainerInterface $c) {
871
+		$this->registerService(AppManager::class, function(ContainerInterface $c) {
872 872
 			// TODO: use auto-wiring
873 873
 			return new \OC\App\AppManager(
874 874
 				$c->get(IUserSession::class),
@@ -888,7 +888,7 @@  discard block
 block discarded – undo
888 888
 		/** @deprecated 19.0.0 */
889 889
 		$this->registerDeprecatedAlias('DateTimeZone', IDateTimeZone::class);
890 890
 
891
-		$this->registerService(IDateTimeFormatter::class, function (Server $c) {
891
+		$this->registerService(IDateTimeFormatter::class, function(Server $c) {
892 892
 			$language = $c->get(\OCP\IConfig::class)->getUserValue($c->get(ISession::class)->get('user_id'), 'core', 'lang', null);
893 893
 
894 894
 			return new DateTimeFormatter(
@@ -899,7 +899,7 @@  discard block
 block discarded – undo
899 899
 		/** @deprecated 19.0.0 */
900 900
 		$this->registerDeprecatedAlias('DateTimeFormatter', IDateTimeFormatter::class);
901 901
 
902
-		$this->registerService(IUserMountCache::class, function (ContainerInterface $c) {
902
+		$this->registerService(IUserMountCache::class, function(ContainerInterface $c) {
903 903
 			$mountCache = new UserMountCache(
904 904
 				$c->get(IDBConnection::class),
905 905
 				$c->get(IUserManager::class),
@@ -912,7 +912,7 @@  discard block
 block discarded – undo
912 912
 		/** @deprecated 19.0.0 */
913 913
 		$this->registerDeprecatedAlias('UserMountCache', IUserMountCache::class);
914 914
 
915
-		$this->registerService(IMountProviderCollection::class, function (ContainerInterface $c) {
915
+		$this->registerService(IMountProviderCollection::class, function(ContainerInterface $c) {
916 916
 			$loader = \OC\Files\Filesystem::getLoader();
917 917
 			$mountCache = $c->get(IUserMountCache::class);
918 918
 			$manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache);
@@ -933,7 +933,7 @@  discard block
 block discarded – undo
933 933
 
934 934
 		/** @deprecated 20.0.0 */
935 935
 		$this->registerDeprecatedAlias('IniWrapper', IniGetWrapper::class);
936
-		$this->registerService(IBus::class, function (ContainerInterface $c) {
936
+		$this->registerService(IBus::class, function(ContainerInterface $c) {
937 937
 			$busClass = $c->get(\OCP\IConfig::class)->getSystemValue('commandbus');
938 938
 			if ($busClass) {
939 939
 				[$app, $class] = explode('::', $busClass, 2);
@@ -953,7 +953,7 @@  discard block
 block discarded – undo
953 953
 		$this->registerDeprecatedAlias('TrustedDomainHelper', TrustedDomainHelper::class);
954 954
 		/** @deprecated 19.0.0 */
955 955
 		$this->registerDeprecatedAlias('Throttler', Throttler::class);
956
-		$this->registerService('IntegrityCodeChecker', function (ContainerInterface $c) {
956
+		$this->registerService('IntegrityCodeChecker', function(ContainerInterface $c) {
957 957
 			// IConfig and IAppManager requires a working database. This code
958 958
 			// might however be called when ownCloud is not yet setup.
959 959
 			if (\OC::$server->get(SystemConfig::class)->getValue('installed', false)) {
@@ -974,7 +974,7 @@  discard block
 block discarded – undo
974 974
 				$c->get(IMimeTypeDetector::class)
975 975
 			);
976 976
 		});
977
-		$this->registerService(\OCP\IRequest::class, function (ContainerInterface $c) {
977
+		$this->registerService(\OCP\IRequest::class, function(ContainerInterface $c) {
978 978
 			if (isset($this['urlParams'])) {
979 979
 				$urlParams = $this['urlParams'];
980 980
 			} else {
@@ -1011,7 +1011,7 @@  discard block
 block discarded – undo
1011 1011
 		/** @deprecated 19.0.0 */
1012 1012
 		$this->registerDeprecatedAlias('Request', \OCP\IRequest::class);
1013 1013
 
1014
-		$this->registerService(IMailer::class, function (Server $c) {
1014
+		$this->registerService(IMailer::class, function(Server $c) {
1015 1015
 			return new Mailer(
1016 1016
 				$c->get(\OCP\IConfig::class),
1017 1017
 				$c->get(ILogger::class),
@@ -1028,7 +1028,7 @@  discard block
 block discarded – undo
1028 1028
 		/** @deprecated 21.0.0 */
1029 1029
 		$this->registerDeprecatedAlias('LDAPProvider', ILDAPProvider::class);
1030 1030
 
1031
-		$this->registerService(ILDAPProviderFactory::class, function (ContainerInterface $c) {
1031
+		$this->registerService(ILDAPProviderFactory::class, function(ContainerInterface $c) {
1032 1032
 			$config = $c->get(\OCP\IConfig::class);
1033 1033
 			$factoryClass = $config->getSystemValue('ldapProviderFactory', null);
1034 1034
 			if (is_null($factoryClass)) {
@@ -1037,11 +1037,11 @@  discard block
 block discarded – undo
1037 1037
 			/** @var \OCP\LDAP\ILDAPProviderFactory $factory */
1038 1038
 			return new $factoryClass($this);
1039 1039
 		});
1040
-		$this->registerService(ILDAPProvider::class, function (ContainerInterface $c) {
1040
+		$this->registerService(ILDAPProvider::class, function(ContainerInterface $c) {
1041 1041
 			$factory = $c->get(ILDAPProviderFactory::class);
1042 1042
 			return $factory->getLDAPProvider();
1043 1043
 		});
1044
-		$this->registerService(ILockingProvider::class, function (ContainerInterface $c) {
1044
+		$this->registerService(ILockingProvider::class, function(ContainerInterface $c) {
1045 1045
 			$ini = $c->get(IniGetWrapper::class);
1046 1046
 			$config = $c->get(\OCP\IConfig::class);
1047 1047
 			$ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time')));
@@ -1069,12 +1069,12 @@  discard block
 block discarded – undo
1069 1069
 		/** @deprecated 19.0.0 */
1070 1070
 		$this->registerDeprecatedAlias('MountManager', IMountManager::class);
1071 1071
 
1072
-		$this->registerService(IMimeTypeDetector::class, function (ContainerInterface $c) {
1072
+		$this->registerService(IMimeTypeDetector::class, function(ContainerInterface $c) {
1073 1073
 			return new \OC\Files\Type\Detection(
1074 1074
 				$c->get(IURLGenerator::class),
1075 1075
 				$c->get(ILogger::class),
1076 1076
 				\OC::$configDir,
1077
-				\OC::$SERVERROOT . '/resources/config/'
1077
+				\OC::$SERVERROOT.'/resources/config/'
1078 1078
 			);
1079 1079
 		});
1080 1080
 		/** @deprecated 19.0.0 */
@@ -1083,19 +1083,19 @@  discard block
 block discarded – undo
1083 1083
 		$this->registerAlias(IMimeTypeLoader::class, Loader::class);
1084 1084
 		/** @deprecated 19.0.0 */
1085 1085
 		$this->registerDeprecatedAlias('MimeTypeLoader', IMimeTypeLoader::class);
1086
-		$this->registerService(BundleFetcher::class, function () {
1086
+		$this->registerService(BundleFetcher::class, function() {
1087 1087
 			return new BundleFetcher($this->getL10N('lib'));
1088 1088
 		});
1089 1089
 		$this->registerAlias(\OCP\Notification\IManager::class, Manager::class);
1090 1090
 		/** @deprecated 19.0.0 */
1091 1091
 		$this->registerDeprecatedAlias('NotificationManager', \OCP\Notification\IManager::class);
1092 1092
 
1093
-		$this->registerService(CapabilitiesManager::class, function (ContainerInterface $c) {
1093
+		$this->registerService(CapabilitiesManager::class, function(ContainerInterface $c) {
1094 1094
 			$manager = new CapabilitiesManager($c->get(ILogger::class));
1095
-			$manager->registerCapability(function () use ($c) {
1095
+			$manager->registerCapability(function() use ($c) {
1096 1096
 				return new \OC\OCS\CoreCapabilities($c->get(\OCP\IConfig::class));
1097 1097
 			});
1098
-			$manager->registerCapability(function () use ($c) {
1098
+			$manager->registerCapability(function() use ($c) {
1099 1099
 				return $c->get(\OC\Security\Bruteforce\Capabilities::class);
1100 1100
 			});
1101 1101
 			return $manager;
@@ -1103,14 +1103,14 @@  discard block
 block discarded – undo
1103 1103
 		/** @deprecated 19.0.0 */
1104 1104
 		$this->registerDeprecatedAlias('CapabilitiesManager', CapabilitiesManager::class);
1105 1105
 
1106
-		$this->registerService(ICommentsManager::class, function (Server $c) {
1106
+		$this->registerService(ICommentsManager::class, function(Server $c) {
1107 1107
 			$config = $c->get(\OCP\IConfig::class);
1108 1108
 			$factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class);
1109 1109
 			/** @var \OCP\Comments\ICommentsManagerFactory $factory */
1110 1110
 			$factory = new $factoryClass($this);
1111 1111
 			$manager = $factory->getManager();
1112 1112
 
1113
-			$manager->registerDisplayNameResolver('user', function ($id) use ($c) {
1113
+			$manager->registerDisplayNameResolver('user', function($id) use ($c) {
1114 1114
 				$manager = $c->get(IUserManager::class);
1115 1115
 				$user = $manager->get($id);
1116 1116
 				if (is_null($user)) {
@@ -1128,7 +1128,7 @@  discard block
 block discarded – undo
1128 1128
 		$this->registerDeprecatedAlias('CommentsManager', ICommentsManager::class);
1129 1129
 
1130 1130
 		$this->registerAlias(\OC_Defaults::class, 'ThemingDefaults');
1131
-		$this->registerService('ThemingDefaults', function (Server $c) {
1131
+		$this->registerService('ThemingDefaults', function(Server $c) {
1132 1132
 			/*
1133 1133
 			 * Dark magic for autoloader.
1134 1134
 			 * If we do a class_exists it will try to load the class which will
@@ -1163,7 +1163,7 @@  discard block
 block discarded – undo
1163 1163
 			}
1164 1164
 			return new \OC_Defaults();
1165 1165
 		});
1166
-		$this->registerService(JSCombiner::class, function (Server $c) {
1166
+		$this->registerService(JSCombiner::class, function(Server $c) {
1167 1167
 			return new JSCombiner(
1168 1168
 				$c->getAppDataDir('js'),
1169 1169
 				$c->get(IURLGenerator::class),
@@ -1177,7 +1177,7 @@  discard block
 block discarded – undo
1177 1177
 		$this->registerDeprecatedAlias('EventDispatcher', \OC\EventDispatcher\SymfonyAdapter::class);
1178 1178
 		$this->registerAlias(EventDispatcherInterface::class, \OC\EventDispatcher\SymfonyAdapter::class);
1179 1179
 
1180
-		$this->registerService('CryptoWrapper', function (ContainerInterface $c) {
1180
+		$this->registerService('CryptoWrapper', function(ContainerInterface $c) {
1181 1181
 			// FIXME: Instantiiated here due to cyclic dependency
1182 1182
 			$request = new Request(
1183 1183
 				[
@@ -1204,14 +1204,14 @@  discard block
 block discarded – undo
1204 1204
 		});
1205 1205
 		/** @deprecated 19.0.0 */
1206 1206
 		$this->registerDeprecatedAlias('CsrfTokenManager', CsrfTokenManager::class);
1207
-		$this->registerService(SessionStorage::class, function (ContainerInterface $c) {
1207
+		$this->registerService(SessionStorage::class, function(ContainerInterface $c) {
1208 1208
 			return new SessionStorage($c->get(ISession::class));
1209 1209
 		});
1210 1210
 		$this->registerAlias(\OCP\Security\IContentSecurityPolicyManager::class, ContentSecurityPolicyManager::class);
1211 1211
 		/** @deprecated 19.0.0 */
1212 1212
 		$this->registerDeprecatedAlias('ContentSecurityPolicyManager', ContentSecurityPolicyManager::class);
1213 1213
 
1214
-		$this->registerService(\OCP\Share\IManager::class, function (IServerContainer $c) {
1214
+		$this->registerService(\OCP\Share\IManager::class, function(IServerContainer $c) {
1215 1215
 			$config = $c->get(\OCP\IConfig::class);
1216 1216
 			$factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class);
1217 1217
 			/** @var \OCP\Share\IProviderFactory $factory */
@@ -1241,7 +1241,7 @@  discard block
 block discarded – undo
1241 1241
 		/** @deprecated 19.0.0 */
1242 1242
 		$this->registerDeprecatedAlias('ShareManager', \OCP\Share\IManager::class);
1243 1243
 
1244
-		$this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function (Server $c) {
1244
+		$this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function(Server $c) {
1245 1245
 			$instance = new Collaboration\Collaborators\Search($c);
1246 1246
 
1247 1247
 			// register default plugins
@@ -1264,33 +1264,33 @@  discard block
 block discarded – undo
1264 1264
 
1265 1265
 		$this->registerDeprecatedAlias('SettingsManager', \OC\Settings\Manager::class);
1266 1266
 		$this->registerAlias(\OCP\Settings\IManager::class, \OC\Settings\Manager::class);
1267
-		$this->registerService(\OC\Files\AppData\Factory::class, function (ContainerInterface $c) {
1267
+		$this->registerService(\OC\Files\AppData\Factory::class, function(ContainerInterface $c) {
1268 1268
 			return new \OC\Files\AppData\Factory(
1269 1269
 				$c->get(IRootFolder::class),
1270 1270
 				$c->get(SystemConfig::class)
1271 1271
 			);
1272 1272
 		});
1273 1273
 
1274
-		$this->registerService('LockdownManager', function (ContainerInterface $c) {
1275
-			return new LockdownManager(function () use ($c) {
1274
+		$this->registerService('LockdownManager', function(ContainerInterface $c) {
1275
+			return new LockdownManager(function() use ($c) {
1276 1276
 				return $c->get(ISession::class);
1277 1277
 			});
1278 1278
 		});
1279 1279
 
1280
-		$this->registerService(\OCP\OCS\IDiscoveryService::class, function (ContainerInterface $c) {
1280
+		$this->registerService(\OCP\OCS\IDiscoveryService::class, function(ContainerInterface $c) {
1281 1281
 			return new DiscoveryService(
1282 1282
 				$c->get(ICacheFactory::class),
1283 1283
 				$c->get(IClientService::class)
1284 1284
 			);
1285 1285
 		});
1286 1286
 
1287
-		$this->registerService(ICloudIdManager::class, function (ContainerInterface $c) {
1287
+		$this->registerService(ICloudIdManager::class, function(ContainerInterface $c) {
1288 1288
 			return new CloudIdManager($c->get(\OCP\Contacts\IManager::class));
1289 1289
 		});
1290 1290
 
1291 1291
 		$this->registerAlias(\OCP\GlobalScale\IConfig::class, \OC\GlobalScale\Config::class);
1292 1292
 
1293
-		$this->registerService(ICloudFederationProviderManager::class, function (ContainerInterface $c) {
1293
+		$this->registerService(ICloudFederationProviderManager::class, function(ContainerInterface $c) {
1294 1294
 			return new CloudFederationProviderManager(
1295 1295
 				$c->get(IAppManager::class),
1296 1296
 				$c->get(IClientService::class),
@@ -1299,7 +1299,7 @@  discard block
 block discarded – undo
1299 1299
 			);
1300 1300
 		});
1301 1301
 
1302
-		$this->registerService(ICloudFederationFactory::class, function (Server $c) {
1302
+		$this->registerService(ICloudFederationFactory::class, function(Server $c) {
1303 1303
 			return new CloudFederationFactory();
1304 1304
 		});
1305 1305
 
@@ -1311,7 +1311,7 @@  discard block
 block discarded – undo
1311 1311
 		/** @deprecated 19.0.0 */
1312 1312
 		$this->registerDeprecatedAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class);
1313 1313
 
1314
-		$this->registerService(Defaults::class, function (Server $c) {
1314
+		$this->registerService(Defaults::class, function(Server $c) {
1315 1315
 			return new Defaults(
1316 1316
 				$c->getThemingDefaults()
1317 1317
 			);
@@ -1319,17 +1319,17 @@  discard block
 block discarded – undo
1319 1319
 		/** @deprecated 19.0.0 */
1320 1320
 		$this->registerDeprecatedAlias('Defaults', \OCP\Defaults::class);
1321 1321
 
1322
-		$this->registerService(\OCP\ISession::class, function (ContainerInterface $c) {
1322
+		$this->registerService(\OCP\ISession::class, function(ContainerInterface $c) {
1323 1323
 			return $c->get(\OCP\IUserSession::class)->getSession();
1324 1324
 		}, false);
1325 1325
 
1326
-		$this->registerService(IShareHelper::class, function (ContainerInterface $c) {
1326
+		$this->registerService(IShareHelper::class, function(ContainerInterface $c) {
1327 1327
 			return new ShareHelper(
1328 1328
 				$c->get(\OCP\Share\IManager::class)
1329 1329
 			);
1330 1330
 		});
1331 1331
 
1332
-		$this->registerService(Installer::class, function (ContainerInterface $c) {
1332
+		$this->registerService(Installer::class, function(ContainerInterface $c) {
1333 1333
 			return new Installer(
1334 1334
 				$c->get(AppFetcher::class),
1335 1335
 				$c->get(IClientService::class),
@@ -1340,11 +1340,11 @@  discard block
 block discarded – undo
1340 1340
 			);
1341 1341
 		});
1342 1342
 
1343
-		$this->registerService(IApiFactory::class, function (ContainerInterface $c) {
1343
+		$this->registerService(IApiFactory::class, function(ContainerInterface $c) {
1344 1344
 			return new ApiFactory($c->get(IClientService::class));
1345 1345
 		});
1346 1346
 
1347
-		$this->registerService(IInstanceFactory::class, function (ContainerInterface $c) {
1347
+		$this->registerService(IInstanceFactory::class, function(ContainerInterface $c) {
1348 1348
 			$memcacheFactory = $c->get(ICacheFactory::class);
1349 1349
 			return new InstanceFactory($memcacheFactory->createLocal('remoteinstance.'), $c->get(IClientService::class));
1350 1350
 		});
@@ -1401,7 +1401,7 @@  discard block
 block discarded – undo
1401 1401
 		$dispatcher = $this->get(SymfonyAdapter::class);
1402 1402
 
1403 1403
 		// Delete avatar on user deletion
1404
-		$dispatcher->addListener('OCP\IUser::preDelete', function (GenericEvent $e) {
1404
+		$dispatcher->addListener('OCP\IUser::preDelete', function(GenericEvent $e) {
1405 1405
 			$logger = $this->get(ILogger::class);
1406 1406
 			$manager = $this->getAvatarManager();
1407 1407
 			/** @var IUser $user */
@@ -1414,11 +1414,11 @@  discard block
 block discarded – undo
1414 1414
 				// no avatar to remove
1415 1415
 			} catch (\Exception $e) {
1416 1416
 				// Ignore exceptions
1417
-				$logger->info('Could not cleanup avatar of ' . $user->getUID());
1417
+				$logger->info('Could not cleanup avatar of '.$user->getUID());
1418 1418
 			}
1419 1419
 		});
1420 1420
 
1421
-		$dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) {
1421
+		$dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) {
1422 1422
 			$manager = $this->getAvatarManager();
1423 1423
 			/** @var IUser $user */
1424 1424
 			$user = $e->getSubject();
@@ -2309,11 +2309,11 @@  discard block
 block discarded – undo
2309 2309
 	}
2310 2310
 
2311 2311
 	private function registerDeprecatedAlias(string $alias, string $target) {
2312
-		$this->registerService($alias, function (ContainerInterface $container) use ($target, $alias) {
2312
+		$this->registerService($alias, function(ContainerInterface $container) use ($target, $alias) {
2313 2313
 			try {
2314 2314
 				/** @var ILogger $logger */
2315 2315
 				$logger = $container->get(ILogger::class);
2316
-				$logger->debug('The requested alias "' . $alias . '" is deprecated. Please request "' . $target . '" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']);
2316
+				$logger->debug('The requested alias "'.$alias.'" is deprecated. Please request "'.$target.'" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']);
2317 2317
 			} catch (ContainerExceptionInterface $e) {
2318 2318
 				// Could not get logger. Continue
2319 2319
 			}
Please login to merge, or discard this patch.