Passed
Push — master ( 458ec3...50ec86 )
by Roeland
11:42 queued 10s
created
lib/private/Server.php 1 patch
Spacing   +116 added lines, -116 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 		// To find out if we are running from CLI or not
213 213
 		$this->registerParameter('isCLI', \OC::$CLI);
214 214
 
215
-		$this->registerService(\OCP\IServerContainer::class, function (IServerContainer $c) {
215
+		$this->registerService(\OCP\IServerContainer::class, function(IServerContainer $c) {
216 216
 			return $c;
217 217
 		});
218 218
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		$this->registerAlias(IActionFactory::class, ActionFactory::class);
234 234
 
235 235
 
236
-		$this->registerService(\OCP\IPreview::class, function (Server $c) {
236
+		$this->registerService(\OCP\IPreview::class, function(Server $c) {
237 237
 			return new PreviewManager(
238 238
 				$c->getConfig(),
239 239
 				$c->getRootFolder(),
@@ -245,13 +245,13 @@  discard block
 block discarded – undo
245 245
 		});
246 246
 		$this->registerDeprecatedAlias('PreviewManager', \OCP\IPreview::class);
247 247
 
248
-		$this->registerService(\OC\Preview\Watcher::class, function (Server $c) {
248
+		$this->registerService(\OC\Preview\Watcher::class, function(Server $c) {
249 249
 			return new \OC\Preview\Watcher(
250 250
 				$c->getAppDataDir('preview')
251 251
 			);
252 252
 		});
253 253
 
254
-		$this->registerService(\OCP\Encryption\IManager::class, function (Server $c) {
254
+		$this->registerService(\OCP\Encryption\IManager::class, function(Server $c) {
255 255
 			$view = new View();
256 256
 			$util = new Encryption\Util(
257 257
 				$view,
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 		});
271 271
 		$this->registerDeprecatedAlias('EncryptionManager', \OCP\Encryption\IManager::class);
272 272
 
273
-		$this->registerService('EncryptionFileHelper', function (Server $c) {
273
+		$this->registerService('EncryptionFileHelper', function(Server $c) {
274 274
 			$util = new Encryption\Util(
275 275
 				new View(),
276 276
 				$c->getUserManager(),
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 			);
285 285
 		});
286 286
 
287
-		$this->registerService('EncryptionKeyStorage', function (Server $c) {
287
+		$this->registerService('EncryptionKeyStorage', function(Server $c) {
288 288
 			$view = new View();
289 289
 			$util = new Encryption\Util(
290 290
 				$view,
@@ -295,30 +295,30 @@  discard block
 block discarded – undo
295 295
 
296 296
 			return new Encryption\Keys\Storage($view, $util);
297 297
 		});
298
-		$this->registerService('TagMapper', function (Server $c) {
298
+		$this->registerService('TagMapper', function(Server $c) {
299 299
 			return new TagMapper($c->getDatabaseConnection());
300 300
 		});
301 301
 
302
-		$this->registerService(\OCP\ITagManager::class, function (Server $c) {
302
+		$this->registerService(\OCP\ITagManager::class, function(Server $c) {
303 303
 			$tagMapper = $c->query('TagMapper');
304 304
 			return new TagManager($tagMapper, $c->getUserSession());
305 305
 		});
306 306
 		$this->registerDeprecatedAlias('TagManager', \OCP\ITagManager::class);
307 307
 
308
-		$this->registerService('SystemTagManagerFactory', function (Server $c) {
308
+		$this->registerService('SystemTagManagerFactory', function(Server $c) {
309 309
 			$config = $c->getConfig();
310 310
 			$factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class);
311 311
 			return new $factoryClass($this);
312 312
 		});
313
-		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function (Server $c) {
313
+		$this->registerService(\OCP\SystemTag\ISystemTagManager::class, function(Server $c) {
314 314
 			return $c->query('SystemTagManagerFactory')->getManager();
315 315
 		});
316 316
 		$this->registerDeprecatedAlias('SystemTagManager', \OCP\SystemTag\ISystemTagManager::class);
317 317
 
318
-		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function (Server $c) {
318
+		$this->registerService(\OCP\SystemTag\ISystemTagObjectMapper::class, function(Server $c) {
319 319
 			return $c->query('SystemTagManagerFactory')->getObjectMapper();
320 320
 		});
321
-		$this->registerService('RootFolder', function (Server $c) {
321
+		$this->registerService('RootFolder', function(Server $c) {
322 322
 			$manager = \OC\Files\Filesystem::getMountManager(null);
323 323
 			$view = new View();
324 324
 			$root = new Root(
@@ -339,8 +339,8 @@  discard block
 block discarded – undo
339 339
 		});
340 340
 		$this->registerDeprecatedAlias('SystemTagObjectMapper', \OCP\SystemTag\ISystemTagObjectMapper::class);
341 341
 
342
-		$this->registerService(\OCP\Files\IRootFolder::class, function (Server $c) {
343
-			return new LazyRoot(function () use ($c) {
342
+		$this->registerService(\OCP\Files\IRootFolder::class, function(Server $c) {
343
+			return new LazyRoot(function() use ($c) {
344 344
 				return $c->query('RootFolder');
345 345
 			});
346 346
 		});
@@ -349,44 +349,44 @@  discard block
 block discarded – undo
349 349
 		$this->registerDeprecatedAlias('UserManager', \OC\User\Manager::class);
350 350
 		$this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class);
351 351
 
352
-		$this->registerService(\OCP\IGroupManager::class, function (Server $c) {
352
+		$this->registerService(\OCP\IGroupManager::class, function(Server $c) {
353 353
 			$groupManager = new \OC\Group\Manager($this->getUserManager(), $c->getEventDispatcher(), $this->getLogger());
354
-			$groupManager->listen('\OC\Group', 'preCreate', function ($gid) {
354
+			$groupManager->listen('\OC\Group', 'preCreate', function($gid) {
355 355
 				\OC_Hook::emit('OC_Group', 'pre_createGroup', array('run' => true, 'gid' => $gid));
356 356
 
357 357
 				/** @var IEventDispatcher $dispatcher */
358 358
 				$dispatcher = $this->query(IEventDispatcher::class);
359 359
 				$dispatcher->dispatchTyped(new BeforeGroupCreatedEvent($gid));
360 360
 			});
361
-			$groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $group) {
361
+			$groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $group) {
362 362
 				\OC_Hook::emit('OC_User', 'post_createGroup', array('gid' => $group->getGID()));
363 363
 
364 364
 				/** @var IEventDispatcher $dispatcher */
365 365
 				$dispatcher = $this->query(IEventDispatcher::class);
366 366
 				$dispatcher->dispatchTyped(new GroupCreatedEvent($group));
367 367
 			});
368
-			$groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) {
368
+			$groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) {
369 369
 				\OC_Hook::emit('OC_Group', 'pre_deleteGroup', array('run' => true, 'gid' => $group->getGID()));
370 370
 
371 371
 				/** @var IEventDispatcher $dispatcher */
372 372
 				$dispatcher = $this->query(IEventDispatcher::class);
373 373
 				$dispatcher->dispatchTyped(new BeforeGroupDeletedEvent($group));
374 374
 			});
375
-			$groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) {
375
+			$groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) {
376 376
 				\OC_Hook::emit('OC_User', 'post_deleteGroup', array('gid' => $group->getGID()));
377 377
 
378 378
 				/** @var IEventDispatcher $dispatcher */
379 379
 				$dispatcher = $this->query(IEventDispatcher::class);
380 380
 				$dispatcher->dispatchTyped(new GroupDeletedEvent($group));
381 381
 			});
382
-			$groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
382
+			$groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
383 383
 				\OC_Hook::emit('OC_Group', 'pre_addToGroup', array('run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID()));
384 384
 
385 385
 				/** @var IEventDispatcher $dispatcher */
386 386
 				$dispatcher = $this->query(IEventDispatcher::class);
387 387
 				$dispatcher->dispatchTyped(new BeforeUserAddedEvent($group, $user));
388 388
 			});
389
-			$groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) {
389
+			$groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) {
390 390
 				\OC_Hook::emit('OC_Group', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
391 391
 				//Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks
392 392
 				\OC_Hook::emit('OC_User', 'post_addToGroup', array('uid' => $user->getUID(), 'gid' => $group->getGID()));
@@ -395,12 +395,12 @@  discard block
 block discarded – undo
395 395
 				$dispatcher = $this->query(IEventDispatcher::class);
396 396
 				$dispatcher->dispatchTyped(new UserAddedEvent($group, $user));
397 397
 			});
398
-			$groupManager->listen('\OC\Group', 'preRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) {
398
+			$groupManager->listen('\OC\Group', 'preRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) {
399 399
 				/** @var IEventDispatcher $dispatcher */
400 400
 				$dispatcher = $this->query(IEventDispatcher::class);
401 401
 				$dispatcher->dispatchTyped(new BeforeUserRemovedEvent($group, $user));
402 402
 			});
403
-			$groupManager->listen('\OC\Group', 'postRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) {
403
+			$groupManager->listen('\OC\Group', 'postRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) {
404 404
 				/** @var IEventDispatcher $dispatcher */
405 405
 				$dispatcher = $this->query(IEventDispatcher::class);
406 406
 				$dispatcher->dispatchTyped(new UserRemovedEvent($group, $user));
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
 		});
410 410
 		$this->registerDeprecatedAlias('GroupManager', \OCP\IGroupManager::class);
411 411
 
412
-		$this->registerService(Store::class, function (Server $c) {
412
+		$this->registerService(Store::class, function(Server $c) {
413 413
 			$session = $c->getSession();
414 414
 			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
415 415
 				$tokenProvider = $c->query(IProvider::class);
@@ -420,13 +420,13 @@  discard block
 block discarded – undo
420 420
 			return new Store($session, $logger, $tokenProvider);
421 421
 		});
422 422
 		$this->registerAlias(IStore::class, Store::class);
423
-		$this->registerService(Authentication\Token\DefaultTokenMapper::class, function (Server $c) {
423
+		$this->registerService(Authentication\Token\DefaultTokenMapper::class, function(Server $c) {
424 424
 			$dbConnection = $c->getDatabaseConnection();
425 425
 			return new Authentication\Token\DefaultTokenMapper($dbConnection);
426 426
 		});
427 427
 		$this->registerAlias(IProvider::class, Authentication\Token\Manager::class);
428 428
 
429
-		$this->registerService(\OC\User\Session::class, function (Server $c) {
429
+		$this->registerService(\OC\User\Session::class, function(Server $c) {
430 430
 			$manager = $c->getUserManager();
431 431
 			$session = new \OC\Session\Memory('');
432 432
 			$timeFactory = new TimeFactory();
@@ -451,14 +451,14 @@  discard block
 block discarded – undo
451 451
 				$c->getLogger(),
452 452
 				$c->query(IEventDispatcher::class)
453 453
 			);
454
-			$userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) {
454
+			$userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) {
455 455
 				\OC_Hook::emit('OC_User', 'pre_createUser', array('run' => true, 'uid' => $uid, 'password' => $password));
456 456
 
457 457
 				/** @var IEventDispatcher $dispatcher */
458 458
 				$dispatcher = $this->query(IEventDispatcher::class);
459 459
 				$dispatcher->dispatchTyped(new BeforeUserCreatedEvent($uid, $password));
460 460
 			});
461
-			$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
461
+			$userSession->listen('\OC\User', 'postCreateUser', function($user, $password) {
462 462
 				/** @var $user \OC\User\User */
463 463
 				\OC_Hook::emit('OC_User', 'post_createUser', array('uid' => $user->getUID(), 'password' => $password));
464 464
 
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
 				$dispatcher = $this->query(IEventDispatcher::class);
467 467
 				$dispatcher->dispatchTyped(new UserCreatedEvent($user, $password));
468 468
 			});
469
-			$userSession->listen('\OC\User', 'preDelete', function ($user) use ($legacyDispatcher) {
469
+			$userSession->listen('\OC\User', 'preDelete', function($user) use ($legacyDispatcher) {
470 470
 				/** @var $user \OC\User\User */
471 471
 				\OC_Hook::emit('OC_User', 'pre_deleteUser', array('run' => true, 'uid' => $user->getUID()));
472 472
 				$legacyDispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user));
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 				$dispatcher = $this->query(IEventDispatcher::class);
476 476
 				$dispatcher->dispatchTyped(new BeforeUserDeletedEvent($user));
477 477
 			});
478
-			$userSession->listen('\OC\User', 'postDelete', function ($user) {
478
+			$userSession->listen('\OC\User', 'postDelete', function($user) {
479 479
 				/** @var $user \OC\User\User */
480 480
 				\OC_Hook::emit('OC_User', 'post_deleteUser', array('uid' => $user->getUID()));
481 481
 
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
 				$dispatcher = $this->query(IEventDispatcher::class);
484 484
 				$dispatcher->dispatchTyped(new UserDeletedEvent($user));
485 485
 			});
486
-			$userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) {
486
+			$userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) {
487 487
 				/** @var $user \OC\User\User */
488 488
 				\OC_Hook::emit('OC_User', 'pre_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
489 489
 
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
 				$dispatcher = $this->query(IEventDispatcher::class);
492 492
 				$dispatcher->dispatchTyped(new BeforePasswordUpdatedEvent($user, $password, $recoveryPassword));
493 493
 			});
494
-			$userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) {
494
+			$userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) {
495 495
 				/** @var $user \OC\User\User */
496 496
 				\OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
497 497
 
@@ -499,14 +499,14 @@  discard block
 block discarded – undo
499 499
 				$dispatcher = $this->query(IEventDispatcher::class);
500 500
 				$dispatcher->dispatchTyped(new PasswordUpdatedEvent($user, $password, $recoveryPassword));
501 501
 			});
502
-			$userSession->listen('\OC\User', 'preLogin', function ($uid, $password) {
502
+			$userSession->listen('\OC\User', 'preLogin', function($uid, $password) {
503 503
 				\OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password));
504 504
 
505 505
 				/** @var IEventDispatcher $dispatcher */
506 506
 				$dispatcher = $this->query(IEventDispatcher::class);
507 507
 				$dispatcher->dispatchTyped(new BeforeUserLoggedInEvent($uid, $password));
508 508
 			});
509
-			$userSession->listen('\OC\User', 'postLogin', function ($user, $password, $isTokenLogin) {
509
+			$userSession->listen('\OC\User', 'postLogin', function($user, $password, $isTokenLogin) {
510 510
 				/** @var $user \OC\User\User */
511 511
 				\OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'isTokenLogin' => $isTokenLogin));
512 512
 
@@ -514,12 +514,12 @@  discard block
 block discarded – undo
514 514
 				$dispatcher = $this->query(IEventDispatcher::class);
515 515
 				$dispatcher->dispatchTyped(new UserLoggedInEvent($user, $password, $isTokenLogin));
516 516
 			});
517
-			$userSession->listen('\OC\User', 'preRememberedLogin', function ($uid) {
517
+			$userSession->listen('\OC\User', 'preRememberedLogin', function($uid) {
518 518
 				/** @var IEventDispatcher $dispatcher */
519 519
 				$dispatcher = $this->query(IEventDispatcher::class);
520 520
 				$dispatcher->dispatchTyped(new BeforeUserLoggedInWithCookieEvent($uid));
521 521
 			});
522
-			$userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) {
522
+			$userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) {
523 523
 				/** @var $user \OC\User\User */
524 524
 				\OC_Hook::emit('OC_User', 'post_login', array('run' => true, 'uid' => $user->getUID(), 'password' => $password));
525 525
 
@@ -527,19 +527,19 @@  discard block
 block discarded – undo
527 527
 				$dispatcher = $this->query(IEventDispatcher::class);
528 528
 				$dispatcher->dispatchTyped(new UserLoggedInWithCookieEvent($user, $password));
529 529
 			});
530
-			$userSession->listen('\OC\User', 'logout', function ($user) {
530
+			$userSession->listen('\OC\User', 'logout', function($user) {
531 531
 				\OC_Hook::emit('OC_User', 'logout', array());
532 532
 
533 533
 				/** @var IEventDispatcher $dispatcher */
534 534
 				$dispatcher = $this->query(IEventDispatcher::class);
535 535
 				$dispatcher->dispatchTyped(new BeforeUserLoggedOutEvent($user));
536 536
 			});
537
-			$userSession->listen('\OC\User', 'postLogout', function ($user) {
537
+			$userSession->listen('\OC\User', 'postLogout', function($user) {
538 538
 				/** @var IEventDispatcher $dispatcher */
539 539
 				$dispatcher = $this->query(IEventDispatcher::class);
540 540
 				$dispatcher->dispatchTyped(new UserLoggedOutEvent($user));
541 541
 			});
542
-			$userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) {
542
+			$userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) {
543 543
 				/** @var $user \OC\User\User */
544 544
 				\OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue));
545 545
 
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
 		$this->registerAlias(\OCP\INavigationManager::class, \OC\NavigationManager::class);
558 558
 		$this->registerDeprecatedAlias('NavigationManager', \OCP\INavigationManager::class);
559 559
 
560
-		$this->registerService(\OC\AllConfig::class, function (Server $c) {
560
+		$this->registerService(\OC\AllConfig::class, function(Server $c) {
561 561
 			return new \OC\AllConfig(
562 562
 				$c->getSystemConfig()
563 563
 			);
@@ -565,18 +565,18 @@  discard block
 block discarded – undo
565 565
 		$this->registerDeprecatedAlias('AllConfig', \OC\AllConfig::class);
566 566
 		$this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class);
567 567
 
568
-		$this->registerService(\OC\SystemConfig::class, function ($c) use ($config) {
568
+		$this->registerService(\OC\SystemConfig::class, function($c) use ($config) {
569 569
 			return new \OC\SystemConfig($config);
570 570
 		});
571 571
 		$this->registerDeprecatedAlias('SystemConfig', \OC\SystemConfig::class);
572 572
 
573
-		$this->registerService(\OC\AppConfig::class, function (Server $c) {
573
+		$this->registerService(\OC\AppConfig::class, function(Server $c) {
574 574
 			return new \OC\AppConfig($c->getDatabaseConnection());
575 575
 		});
576 576
 		$this->registerDeprecatedAlias('AppConfig', \OC\AppConfig::class);
577 577
 		$this->registerAlias(\OCP\IAppConfig::class, \OC\AppConfig::class);
578 578
 
579
-		$this->registerService(\OCP\L10N\IFactory::class, function (Server $c) {
579
+		$this->registerService(\OCP\L10N\IFactory::class, function(Server $c) {
580 580
 			return new \OC\L10N\Factory(
581 581
 				$c->getConfig(),
582 582
 				$c->getRequest(),
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 		});
587 587
 		$this->registerDeprecatedAlias('L10NFactory', \OCP\L10N\IFactory::class);
588 588
 
589
-		$this->registerService(\OCP\IURLGenerator::class, function (Server $c) {
589
+		$this->registerService(\OCP\IURLGenerator::class, function(Server $c) {
590 590
 			$config = $c->getConfig();
591 591
 			$cacheFactory = $c->getMemCacheFactory();
592 592
 			$request = $c->getRequest();
@@ -601,12 +601,12 @@  discard block
 block discarded – undo
601 601
 		$this->registerDeprecatedAlias('AppFetcher', AppFetcher::class);
602 602
 		$this->registerDeprecatedAlias('CategoryFetcher', CategoryFetcher::class);
603 603
 
604
-		$this->registerService(\OCP\ICache::class, function ($c) {
604
+		$this->registerService(\OCP\ICache::class, function($c) {
605 605
 			return new Cache\File();
606 606
 		});
607 607
 		$this->registerDeprecatedAlias('UserCache', \OCP\ICache::class);
608 608
 
609
-		$this->registerService(Factory::class, function (Server $c) {
609
+		$this->registerService(Factory::class, function(Server $c) {
610 610
 
611 611
 			$arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(),
612 612
 				ArrayCache::class,
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
 				$version = implode(',', $v);
622 622
 				$instanceId = \OC_Util::getInstanceId();
623 623
 				$path = \OC::$SERVERROOT;
624
-				$prefix = md5($instanceId . '-' . $version . '-' . $path);
624
+				$prefix = md5($instanceId.'-'.$version.'-'.$path);
625 625
 				return new \OC\Memcache\Factory($prefix, $c->getLogger(),
626 626
 					$config->getSystemValue('memcache.local', null),
627 627
 					$config->getSystemValue('memcache.distributed', null),
@@ -634,12 +634,12 @@  discard block
 block discarded – undo
634 634
 		$this->registerDeprecatedAlias('MemCacheFactory', Factory::class);
635 635
 		$this->registerAlias(ICacheFactory::class, Factory::class);
636 636
 
637
-		$this->registerService('RedisFactory', function (Server $c) {
637
+		$this->registerService('RedisFactory', function(Server $c) {
638 638
 			$systemConfig = $c->getSystemConfig();
639 639
 			return new RedisFactory($systemConfig);
640 640
 		});
641 641
 
642
-		$this->registerService(\OCP\Activity\IManager::class, function (Server $c) {
642
+		$this->registerService(\OCP\Activity\IManager::class, function(Server $c) {
643 643
 			return new \OC\Activity\Manager(
644 644
 				$c->getRequest(),
645 645
 				$c->getUserSession(),
@@ -649,7 +649,7 @@  discard block
 block discarded – undo
649 649
 		});
650 650
 		$this->registerDeprecatedAlias('ActivityManager', \OCP\Activity\IManager::class);
651 651
 
652
-		$this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) {
652
+		$this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) {
653 653
 			return new \OC\Activity\EventMerger(
654 654
 				$c->getL10N('lib')
655 655
 			);
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
 		$this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class);
672 672
 		$this->registerAlias(\OCP\Support\Subscription\IRegistry::class, \OC\Support\Subscription\Registry::class);
673 673
 
674
-		$this->registerService(\OC\Log::class, function (Server $c) {
674
+		$this->registerService(\OC\Log::class, function(Server $c) {
675 675
 			$logType = $c->query(AllConfig::class)->getSystemValue('log_type', 'file');
676 676
 			$factory = new LogFactory($c, $this->getSystemConfig());
677 677
 			$logger = $factory->get($logType);
@@ -682,11 +682,11 @@  discard block
 block discarded – undo
682 682
 		$this->registerAlias(\OCP\ILogger::class, \OC\Log::class);
683 683
 		$this->registerDeprecatedAlias('Logger', \OC\Log::class);
684 684
 
685
-		$this->registerService(ILogFactory::class, function (Server $c) {
685
+		$this->registerService(ILogFactory::class, function(Server $c) {
686 686
 			return new LogFactory($c, $this->getSystemConfig());
687 687
 		});
688 688
 
689
-		$this->registerService(\OCP\BackgroundJob\IJobList::class, function (Server $c) {
689
+		$this->registerService(\OCP\BackgroundJob\IJobList::class, function(Server $c) {
690 690
 			$config = $c->getConfig();
691 691
 			return new \OC\BackgroundJob\JobList(
692 692
 				$c->getDatabaseConnection(),
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
 		});
697 697
 		$this->registerDeprecatedAlias('JobList', \OCP\BackgroundJob\IJobList::class);
698 698
 
699
-		$this->registerService(\OCP\Route\IRouter::class, function (Server $c) {
699
+		$this->registerService(\OCP\Route\IRouter::class, function(Server $c) {
700 700
 			$cacheFactory = $c->getMemCacheFactory();
701 701
 			$logger = $c->getLogger();
702 702
 			if ($cacheFactory->isLocalCacheAvailable()) {
@@ -708,39 +708,39 @@  discard block
 block discarded – undo
708 708
 		});
709 709
 		$this->registerDeprecatedAlias('Router', \OCP\Route\IRouter::class);
710 710
 
711
-		$this->registerService(\OCP\ISearch::class, function ($c) {
711
+		$this->registerService(\OCP\ISearch::class, function($c) {
712 712
 			return new Search();
713 713
 		});
714 714
 		$this->registerDeprecatedAlias('Search', \OCP\ISearch::class);
715 715
 
716
-		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) {
716
+		$this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) {
717 717
 			return new \OC\Security\RateLimiting\Backend\MemoryCache(
718 718
 				$this->getMemCacheFactory(),
719 719
 				new \OC\AppFramework\Utility\TimeFactory()
720 720
 			);
721 721
 		});
722 722
 
723
-		$this->registerService(\OCP\Security\ISecureRandom::class, function ($c) {
723
+		$this->registerService(\OCP\Security\ISecureRandom::class, function($c) {
724 724
 			return new SecureRandom();
725 725
 		});
726 726
 		$this->registerDeprecatedAlias('SecureRandom', \OCP\Security\ISecureRandom::class);
727 727
 
728
-		$this->registerService(\OCP\Security\ICrypto::class, function (Server $c) {
728
+		$this->registerService(\OCP\Security\ICrypto::class, function(Server $c) {
729 729
 			return new Crypto($c->getConfig(), $c->getSecureRandom());
730 730
 		});
731 731
 		$this->registerDeprecatedAlias('Crypto', \OCP\Security\ICrypto::class);
732 732
 
733
-		$this->registerService(\OCP\Security\IHasher::class, function (Server $c) {
733
+		$this->registerService(\OCP\Security\IHasher::class, function(Server $c) {
734 734
 			return new Hasher($c->getConfig());
735 735
 		});
736 736
 		$this->registerDeprecatedAlias('Hasher', \OCP\Security\IHasher::class);
737 737
 
738
-		$this->registerService(\OCP\Security\ICredentialsManager::class, function (Server $c) {
738
+		$this->registerService(\OCP\Security\ICredentialsManager::class, function(Server $c) {
739 739
 			return new CredentialsManager($c->getCrypto(), $c->getDatabaseConnection());
740 740
 		});
741 741
 		$this->registerDeprecatedAlias('CredentialsManager', \OCP\Security\ICredentialsManager::class);
742 742
 
743
-		$this->registerService(IDBConnection::class, function (Server $c) {
743
+		$this->registerService(IDBConnection::class, function(Server $c) {
744 744
 			$systemConfig = $c->getSystemConfig();
745 745
 			$factory = new \OC\DB\ConnectionFactory($systemConfig);
746 746
 			$type = $systemConfig->getValue('dbtype', 'sqlite');
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
 		$this->registerDeprecatedAlias('DatabaseConnection', IDBConnection::class);
756 756
 
757 757
 
758
-		$this->registerService(\OCP\Http\Client\IClientService::class, function (Server $c) {
758
+		$this->registerService(\OCP\Http\Client\IClientService::class, function(Server $c) {
759 759
 			$user = \OC_User::getUser();
760 760
 			$uid = $user ? $user : null;
761 761
 			return new ClientService(
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
 			);
771 771
 		});
772 772
 		$this->registerDeprecatedAlias('HttpClientService', \OCP\Http\Client\IClientService::class);
773
-		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) {
773
+		$this->registerService(\OCP\Diagnostics\IEventLogger::class, function(Server $c) {
774 774
 			$eventLogger = new EventLogger();
775 775
 			if ($c->getSystemConfig()->getValue('debug', false)) {
776 776
 				// In debug mode, module is being activated by default
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
 		});
781 781
 		$this->registerDeprecatedAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class);
782 782
 
783
-		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) {
783
+		$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function(Server $c) {
784 784
 			$queryLogger = new QueryLogger();
785 785
 			if ($c->getSystemConfig()->getValue('debug', false)) {
786 786
 				// In debug mode, module is being activated by default
@@ -790,7 +790,7 @@  discard block
 block discarded – undo
790 790
 		});
791 791
 		$this->registerDeprecatedAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class);
792 792
 
793
-		$this->registerService(TempManager::class, function (Server $c) {
793
+		$this->registerService(TempManager::class, function(Server $c) {
794 794
 			return new TempManager(
795 795
 				$c->getLogger(),
796 796
 				$c->getConfig()
@@ -799,7 +799,7 @@  discard block
 block discarded – undo
799 799
 		$this->registerDeprecatedAlias('TempManager', TempManager::class);
800 800
 		$this->registerAlias(ITempManager::class, TempManager::class);
801 801
 
802
-		$this->registerService(AppManager::class, function (Server $c) {
802
+		$this->registerService(AppManager::class, function(Server $c) {
803 803
 			return new \OC\App\AppManager(
804 804
 				$c->getUserSession(),
805 805
 				$c->getConfig(),
@@ -813,7 +813,7 @@  discard block
 block discarded – undo
813 813
 		$this->registerDeprecatedAlias('AppManager', AppManager::class);
814 814
 		$this->registerAlias(IAppManager::class, AppManager::class);
815 815
 
816
-		$this->registerService(\OCP\IDateTimeZone::class, function (Server $c) {
816
+		$this->registerService(\OCP\IDateTimeZone::class, function(Server $c) {
817 817
 			return new DateTimeZone(
818 818
 				$c->getConfig(),
819 819
 				$c->getSession()
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
 		});
822 822
 		$this->registerDeprecatedAlias('DateTimeZone', \OCP\IDateTimeZone::class);
823 823
 
824
-		$this->registerService(\OCP\IDateTimeFormatter::class, function (Server $c) {
824
+		$this->registerService(\OCP\IDateTimeFormatter::class, function(Server $c) {
825 825
 			$language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null);
826 826
 
827 827
 			return new DateTimeFormatter(
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
 		});
832 832
 		$this->registerDeprecatedAlias('DateTimeFormatter', \OCP\IDateTimeFormatter::class);
833 833
 
834
-		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function (Server $c) {
834
+		$this->registerService(\OCP\Files\Config\IUserMountCache::class, function(Server $c) {
835 835
 			$mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger());
836 836
 			$listener = new UserMountCacheListener($mountCache);
837 837
 			$listener->listen($c->getUserManager());
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
 		});
840 840
 		$this->registerDeprecatedAlias('UserMountCache', \OCP\Files\Config\IUserMountCache::class);
841 841
 
842
-		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function (Server $c) {
842
+		$this->registerService(\OCP\Files\Config\IMountProviderCollection::class, function(Server $c) {
843 843
 			$loader = \OC\Files\Filesystem::getLoader();
844 844
 			$mountCache = $c->query('UserMountCache');
845 845
 			$manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache);
@@ -855,10 +855,10 @@  discard block
 block discarded – undo
855 855
 		});
856 856
 		$this->registerDeprecatedAlias('MountConfigManager', \OCP\Files\Config\IMountProviderCollection::class);
857 857
 
858
-		$this->registerService('IniWrapper', function ($c) {
858
+		$this->registerService('IniWrapper', function($c) {
859 859
 			return new IniGetWrapper();
860 860
 		});
861
-		$this->registerService('AsyncCommandBus', function (Server $c) {
861
+		$this->registerService('AsyncCommandBus', function(Server $c) {
862 862
 			$busClass = $c->getConfig()->getSystemValue('commandbus');
863 863
 			if ($busClass) {
864 864
 				list($app, $class) = explode('::', $busClass, 2);
@@ -873,10 +873,10 @@  discard block
 block discarded – undo
873 873
 				return new CronBus($jobList);
874 874
 			}
875 875
 		});
876
-		$this->registerService('TrustedDomainHelper', function ($c) {
876
+		$this->registerService('TrustedDomainHelper', function($c) {
877 877
 			return new TrustedDomainHelper($this->getConfig());
878 878
 		});
879
-		$this->registerService(Throttler::class, function (Server $c) {
879
+		$this->registerService(Throttler::class, function(Server $c) {
880 880
 			return new Throttler(
881 881
 				$c->getDatabaseConnection(),
882 882
 				new TimeFactory(),
@@ -885,7 +885,7 @@  discard block
 block discarded – undo
885 885
 			);
886 886
 		});
887 887
 		$this->registerDeprecatedAlias('Throttler', Throttler::class);
888
-		$this->registerService('IntegrityCodeChecker', function (Server $c) {
888
+		$this->registerService('IntegrityCodeChecker', function(Server $c) {
889 889
 			// IConfig and IAppManager requires a working database. This code
890 890
 			// might however be called when ownCloud is not yet setup.
891 891
 			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
@@ -907,7 +907,7 @@  discard block
 block discarded – undo
907 907
 				$c->getMimeTypeDetector()
908 908
 			);
909 909
 		});
910
-		$this->registerService(\OCP\IRequest::class, function ($c) {
910
+		$this->registerService(\OCP\IRequest::class, function($c) {
911 911
 			if (isset($this['urlParams'])) {
912 912
 				$urlParams = $this['urlParams'];
913 913
 			} else {
@@ -943,7 +943,7 @@  discard block
 block discarded – undo
943 943
 		});
944 944
 		$this->registerDeprecatedAlias('Request', \OCP\IRequest::class);
945 945
 
946
-		$this->registerService(\OCP\Mail\IMailer::class, function (Server $c) {
946
+		$this->registerService(\OCP\Mail\IMailer::class, function(Server $c) {
947 947
 			return new Mailer(
948 948
 				$c->getConfig(),
949 949
 				$c->getLogger(),
@@ -954,7 +954,7 @@  discard block
 block discarded – undo
954 954
 		});
955 955
 		$this->registerDeprecatedAlias('Mailer', \OCP\Mail\IMailer::class);
956 956
 
957
-		$this->registerService('LDAPProvider', function (Server $c) {
957
+		$this->registerService('LDAPProvider', function(Server $c) {
958 958
 			$config = $c->getConfig();
959 959
 			$factoryClass = $config->getSystemValue('ldapProviderFactory', null);
960 960
 			if (is_null($factoryClass)) {
@@ -964,7 +964,7 @@  discard block
 block discarded – undo
964 964
 			$factory = new $factoryClass($this);
965 965
 			return $factory->getLDAPProvider();
966 966
 		});
967
-		$this->registerService(ILockingProvider::class, function (Server $c) {
967
+		$this->registerService(ILockingProvider::class, function(Server $c) {
968 968
 			$ini = $c->getIniWrapper();
969 969
 			$config = $c->getConfig();
970 970
 			$ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time')));
@@ -987,31 +987,31 @@  discard block
 block discarded – undo
987 987
 		});
988 988
 		$this->registerDeprecatedAlias('LockingProvider', ILockingProvider::class);
989 989
 
990
-		$this->registerService(\OCP\Files\Mount\IMountManager::class, function () {
990
+		$this->registerService(\OCP\Files\Mount\IMountManager::class, function() {
991 991
 			return new \OC\Files\Mount\Manager();
992 992
 		});
993 993
 		$this->registerDeprecatedAlias('MountManager', \OCP\Files\Mount\IMountManager::class);
994 994
 
995
-		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function (Server $c) {
995
+		$this->registerService(\OCP\Files\IMimeTypeDetector::class, function(Server $c) {
996 996
 			return new \OC\Files\Type\Detection(
997 997
 				$c->getURLGenerator(),
998 998
 				$c->getLogger(),
999 999
 				\OC::$configDir,
1000
-				\OC::$SERVERROOT . '/resources/config/'
1000
+				\OC::$SERVERROOT.'/resources/config/'
1001 1001
 			);
1002 1002
 		});
1003 1003
 		$this->registerDeprecatedAlias('MimeTypeDetector', \OCP\Files\IMimeTypeDetector::class);
1004 1004
 
1005
-		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function (Server $c) {
1005
+		$this->registerService(\OCP\Files\IMimeTypeLoader::class, function(Server $c) {
1006 1006
 			return new \OC\Files\Type\Loader(
1007 1007
 				$c->getDatabaseConnection()
1008 1008
 			);
1009 1009
 		});
1010 1010
 		$this->registerDeprecatedAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class);
1011
-		$this->registerService(BundleFetcher::class, function () {
1011
+		$this->registerService(BundleFetcher::class, function() {
1012 1012
 			return new BundleFetcher($this->getL10N('lib'));
1013 1013
 		});
1014
-		$this->registerService(\OCP\Notification\IManager::class, function (Server $c) {
1014
+		$this->registerService(\OCP\Notification\IManager::class, function(Server $c) {
1015 1015
 			return new Manager(
1016 1016
 				$c->query(IValidator::class),
1017 1017
 				$c->getLogger()
@@ -1019,19 +1019,19 @@  discard block
 block discarded – undo
1019 1019
 		});
1020 1020
 		$this->registerDeprecatedAlias('NotificationManager', \OCP\Notification\IManager::class);
1021 1021
 
1022
-		$this->registerService(\OC\CapabilitiesManager::class, function (Server $c) {
1022
+		$this->registerService(\OC\CapabilitiesManager::class, function(Server $c) {
1023 1023
 			$manager = new \OC\CapabilitiesManager($c->getLogger());
1024
-			$manager->registerCapability(function () use ($c) {
1024
+			$manager->registerCapability(function() use ($c) {
1025 1025
 				return new \OC\OCS\CoreCapabilities($c->getConfig());
1026 1026
 			});
1027
-			$manager->registerCapability(function () use ($c) {
1027
+			$manager->registerCapability(function() use ($c) {
1028 1028
 				return $c->query(\OC\Security\Bruteforce\Capabilities::class);
1029 1029
 			});
1030 1030
 			return $manager;
1031 1031
 		});
1032 1032
 		$this->registerDeprecatedAlias('CapabilitiesManager', \OC\CapabilitiesManager::class);
1033 1033
 
1034
-		$this->registerService(\OCP\Comments\ICommentsManager::class, function (Server $c) {
1034
+		$this->registerService(\OCP\Comments\ICommentsManager::class, function(Server $c) {
1035 1035
 			$config = $c->getConfig();
1036 1036
 			$factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class);
1037 1037
 			/** @var \OCP\Comments\ICommentsManagerFactory $factory */
@@ -1041,7 +1041,7 @@  discard block
 block discarded – undo
1041 1041
 			$manager->registerDisplayNameResolver('user', function($id) use ($c) {
1042 1042
 				$manager = $c->getUserManager();
1043 1043
 				$user = $manager->get($id);
1044
-				if(is_null($user)) {
1044
+				if (is_null($user)) {
1045 1045
 					$l = $c->getL10N('core');
1046 1046
 					$displayName = $l->t('Unknown user');
1047 1047
 				} else {
@@ -1054,7 +1054,7 @@  discard block
 block discarded – undo
1054 1054
 		});
1055 1055
 		$this->registerDeprecatedAlias('CommentsManager', \OCP\Comments\ICommentsManager::class);
1056 1056
 
1057
-		$this->registerService('ThemingDefaults', function (Server $c) {
1057
+		$this->registerService('ThemingDefaults', function(Server $c) {
1058 1058
 			/*
1059 1059
 			 * Dark magic for autoloader.
1060 1060
 			 * If we do a class_exists it will try to load the class which will
@@ -1082,7 +1082,7 @@  discard block
 block discarded – undo
1082 1082
 			}
1083 1083
 			return new \OC_Defaults();
1084 1084
 		});
1085
-		$this->registerService(SCSSCacher::class, function (Server $c) {
1085
+		$this->registerService(SCSSCacher::class, function(Server $c) {
1086 1086
 			return new SCSSCacher(
1087 1087
 				$c->getLogger(),
1088 1088
 				$c->query(\OC\Files\AppData\Factory::class),
@@ -1095,7 +1095,7 @@  discard block
 block discarded – undo
1095 1095
 				new TimeFactory()
1096 1096
 			);
1097 1097
 		});
1098
-		$this->registerService(JSCombiner::class, function (Server $c) {
1098
+		$this->registerService(JSCombiner::class, function(Server $c) {
1099 1099
 			return new JSCombiner(
1100 1100
 				$c->getAppDataDir('js'),
1101 1101
 				$c->getURLGenerator(),
@@ -1108,7 +1108,7 @@  discard block
 block discarded – undo
1108 1108
 		$this->registerDeprecatedAlias('EventDispatcher', \OC\EventDispatcher\SymfonyAdapter::class);
1109 1109
 		$this->registerAlias(EventDispatcherInterface::class, \OC\EventDispatcher\SymfonyAdapter::class);
1110 1110
 
1111
-		$this->registerService('CryptoWrapper', function (Server $c) {
1111
+		$this->registerService('CryptoWrapper', function(Server $c) {
1112 1112
 			// FIXME: Instantiiated here due to cyclic dependency
1113 1113
 			$request = new Request(
1114 1114
 				[
@@ -1133,7 +1133,7 @@  discard block
 block discarded – undo
1133 1133
 				$request
1134 1134
 			);
1135 1135
 		});
1136
-		$this->registerService(CsrfTokenManager::class, function (Server $c) {
1136
+		$this->registerService(CsrfTokenManager::class, function(Server $c) {
1137 1137
 			$tokenGenerator = new CsrfTokenGenerator($c->getSecureRandom());
1138 1138
 
1139 1139
 			return new CsrfTokenManager(
@@ -1142,20 +1142,20 @@  discard block
 block discarded – undo
1142 1142
 			);
1143 1143
 		});
1144 1144
 		$this->registerDeprecatedAlias('CsrfTokenManager', CsrfTokenManager::class);
1145
-		$this->registerService(SessionStorage::class, function (Server $c) {
1145
+		$this->registerService(SessionStorage::class, function(Server $c) {
1146 1146
 			return new SessionStorage($c->getSession());
1147 1147
 		});
1148 1148
 		$this->registerAlias(\OCP\Security\IContentSecurityPolicyManager::class, \OC\Security\CSP\ContentSecurityPolicyManager::class);
1149 1149
 		$this->registerDeprecatedAlias('ContentSecurityPolicyManager', \OC\Security\CSP\ContentSecurityPolicyManager::class);
1150 1150
 
1151
-		$this->registerService('ContentSecurityPolicyNonceManager', function (Server $c) {
1151
+		$this->registerService('ContentSecurityPolicyNonceManager', function(Server $c) {
1152 1152
 			return new ContentSecurityPolicyNonceManager(
1153 1153
 				$c->getCsrfTokenManager(),
1154 1154
 				$c->getRequest()
1155 1155
 			);
1156 1156
 		});
1157 1157
 
1158
-		$this->registerService(\OCP\Share\IManager::class, function (Server $c) {
1158
+		$this->registerService(\OCP\Share\IManager::class, function(Server $c) {
1159 1159
 			$config = $c->getConfig();
1160 1160
 			$factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class);
1161 1161
 			/** @var \OCP\Share\IProviderFactory $factory */
@@ -1204,7 +1204,7 @@  discard block
 block discarded – undo
1204 1204
 		$this->registerAlias(\OCP\Collaboration\Resources\IProviderManager::class, \OC\Collaboration\Resources\ProviderManager::class);
1205 1205
 		$this->registerAlias(\OCP\Collaboration\Resources\IManager::class, \OC\Collaboration\Resources\Manager::class);
1206 1206
 
1207
-		$this->registerService('SettingsManager', function (Server $c) {
1207
+		$this->registerService('SettingsManager', function(Server $c) {
1208 1208
 			$manager = new \OC\Settings\Manager(
1209 1209
 				$c->getLogger(),
1210 1210
 				$c->getL10NFactory(),
@@ -1213,36 +1213,36 @@  discard block
 block discarded – undo
1213 1213
 			);
1214 1214
 			return $manager;
1215 1215
 		});
1216
-		$this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) {
1216
+		$this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) {
1217 1217
 			return new \OC\Files\AppData\Factory(
1218 1218
 				$c->getRootFolder(),
1219 1219
 				$c->getSystemConfig()
1220 1220
 			);
1221 1221
 		});
1222 1222
 
1223
-		$this->registerService('LockdownManager', function (Server $c) {
1224
-			return new LockdownManager(function () use ($c) {
1223
+		$this->registerService('LockdownManager', function(Server $c) {
1224
+			return new LockdownManager(function() use ($c) {
1225 1225
 				return $c->getSession();
1226 1226
 			});
1227 1227
 		});
1228 1228
 
1229
-		$this->registerService(\OCP\OCS\IDiscoveryService::class, function (Server $c) {
1229
+		$this->registerService(\OCP\OCS\IDiscoveryService::class, function(Server $c) {
1230 1230
 			return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService());
1231 1231
 		});
1232 1232
 
1233
-		$this->registerService(ICloudIdManager::class, function (Server $c) {
1233
+		$this->registerService(ICloudIdManager::class, function(Server $c) {
1234 1234
 			return new CloudIdManager();
1235 1235
 		});
1236 1236
 
1237
-		$this->registerService(IConfig::class, function (Server $c) {
1237
+		$this->registerService(IConfig::class, function(Server $c) {
1238 1238
 			return new GlobalScale\Config($c->getConfig());
1239 1239
 		});
1240 1240
 
1241
-		$this->registerService(ICloudFederationProviderManager::class, function (Server $c) {
1241
+		$this->registerService(ICloudFederationProviderManager::class, function(Server $c) {
1242 1242
 			return new CloudFederationProviderManager($c->getAppManager(), $c->getHTTPClientService(), $c->getCloudIdManager(), $c->getLogger());
1243 1243
 		});
1244 1244
 
1245
-		$this->registerService(ICloudFederationFactory::class, function (Server $c) {
1245
+		$this->registerService(ICloudFederationFactory::class, function(Server $c) {
1246 1246
 			return new CloudFederationFactory();
1247 1247
 		});
1248 1248
 
@@ -1252,18 +1252,18 @@  discard block
 block discarded – undo
1252 1252
 		$this->registerAlias(\OCP\AppFramework\Utility\ITimeFactory::class, \OC\AppFramework\Utility\TimeFactory::class);
1253 1253
 		$this->registerDeprecatedAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class);
1254 1254
 
1255
-		$this->registerService(Defaults::class, function (Server $c) {
1255
+		$this->registerService(Defaults::class, function(Server $c) {
1256 1256
 			return new Defaults(
1257 1257
 				$c->getThemingDefaults()
1258 1258
 			);
1259 1259
 		});
1260 1260
 		$this->registerDeprecatedAlias('Defaults', \OCP\Defaults::class);
1261 1261
 
1262
-		$this->registerService(\OCP\ISession::class, function (SimpleContainer $c) {
1262
+		$this->registerService(\OCP\ISession::class, function(SimpleContainer $c) {
1263 1263
 			return $c->query(\OCP\IUserSession::class)->getSession();
1264 1264
 		});
1265 1265
 
1266
-		$this->registerService(IShareHelper::class, function (Server $c) {
1266
+		$this->registerService(IShareHelper::class, function(Server $c) {
1267 1267
 			return new ShareHelper(
1268 1268
 				$c->query(\OCP\Share\IManager::class)
1269 1269
 			);
@@ -1352,11 +1352,11 @@  discard block
 block discarded – undo
1352 1352
 				// no avatar to remove
1353 1353
 			} catch (\Exception $e) {
1354 1354
 				// Ignore exceptions
1355
-				$logger->info('Could not cleanup avatar of ' . $user->getUID());
1355
+				$logger->info('Could not cleanup avatar of '.$user->getUID());
1356 1356
 			}
1357 1357
 		});
1358 1358
 
1359
-		$dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) {
1359
+		$dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) {
1360 1360
 			$manager = $this->getAvatarManager();
1361 1361
 			/** @var IUser $user */
1362 1362
 			$user = $e->getSubject();
@@ -1512,7 +1512,7 @@  discard block
 block discarded – undo
1512 1512
 	 * @deprecated since 9.2.0 use IAppData
1513 1513
 	 */
1514 1514
 	public function getAppFolder() {
1515
-		$dir = '/' . \OC_App::getCurrentApp();
1515
+		$dir = '/'.\OC_App::getCurrentApp();
1516 1516
 		$root = $this->getRootFolder();
1517 1517
 		if (!$root->nodeExists($dir)) {
1518 1518
 			$folder = $root->newFolder($dir);
@@ -2088,7 +2088,7 @@  discard block
 block discarded – undo
2088 2088
 	/**
2089 2089
 	 * @return \OCP\Collaboration\AutoComplete\IManager
2090 2090
 	 */
2091
-	public function getAutoCompleteManager(){
2091
+	public function getAutoCompleteManager() {
2092 2092
 		return $this->query(IManager::class);
2093 2093
 	}
2094 2094
 
@@ -2184,11 +2184,11 @@  discard block
 block discarded – undo
2184 2184
 	}
2185 2185
 
2186 2186
 	private function registerDeprecatedAlias(string $alias, string $target) {
2187
-		$this->registerService($alias, function (IContainer $container) use ($target, $alias) {
2187
+		$this->registerService($alias, function(IContainer $container) use ($target, $alias) {
2188 2188
 			try {
2189 2189
 				/** @var ILogger $logger */
2190 2190
 				$logger = $container->query(ILogger::class);
2191
-				$logger->debug('The requested alias "' . $alias . '" is depreacted. Please request "' . $target . '" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']);
2191
+				$logger->debug('The requested alias "'.$alias.'" is depreacted. Please request "'.$target.'" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']);
2192 2192
 			} catch (QueryException $e) {
2193 2193
 				// Could not get logger. Continue
2194 2194
 			}
Please login to merge, or discard this patch.