@@ -271,10 +271,10 @@ discard block |
||
271 | 271 | $this->registerParameter('isCLI', \OC::$CLI); |
272 | 272 | $this->registerParameter('serverRoot', \OC::$SERVERROOT); |
273 | 273 | |
274 | - $this->registerService(ContainerInterface::class, function (ContainerInterface $c) { |
|
274 | + $this->registerService(ContainerInterface::class, function(ContainerInterface $c) { |
|
275 | 275 | return $c; |
276 | 276 | }); |
277 | - $this->registerService(\OCP\IServerContainer::class, function (ContainerInterface $c) { |
|
277 | + $this->registerService(\OCP\IServerContainer::class, function(ContainerInterface $c) { |
|
278 | 278 | return $c; |
279 | 279 | }); |
280 | 280 | |
@@ -299,11 +299,11 @@ discard block |
||
299 | 299 | |
300 | 300 | $this->registerAlias(IActionFactory::class, ActionFactory::class); |
301 | 301 | |
302 | - $this->registerService(View::class, function (Server $c) { |
|
302 | + $this->registerService(View::class, function(Server $c) { |
|
303 | 303 | return new View(); |
304 | 304 | }, false); |
305 | 305 | |
306 | - $this->registerService(IPreview::class, function (ContainerInterface $c) { |
|
306 | + $this->registerService(IPreview::class, function(ContainerInterface $c) { |
|
307 | 307 | return new PreviewManager( |
308 | 308 | $c->get(\OCP\IConfig::class), |
309 | 309 | $c->get(IRootFolder::class), |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | /** @deprecated 19.0.0 */ |
320 | 320 | $this->registerDeprecatedAlias('PreviewManager', IPreview::class); |
321 | 321 | |
322 | - $this->registerService(\OC\Preview\Watcher::class, function (ContainerInterface $c) { |
|
322 | + $this->registerService(\OC\Preview\Watcher::class, function(ContainerInterface $c) { |
|
323 | 323 | return new \OC\Preview\Watcher( |
324 | 324 | new \OC\Preview\Storage\Root( |
325 | 325 | $c->get(IRootFolder::class), |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | ); |
329 | 329 | }); |
330 | 330 | |
331 | - $this->registerService(\OCP\Encryption\IManager::class, function (Server $c) { |
|
331 | + $this->registerService(\OCP\Encryption\IManager::class, function(Server $c) { |
|
332 | 332 | $view = new View(); |
333 | 333 | $util = new Encryption\Util( |
334 | 334 | $view, |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | |
351 | 351 | /** @deprecated 21.0.0 */ |
352 | 352 | $this->registerDeprecatedAlias('EncryptionFileHelper', IFile::class); |
353 | - $this->registerService(IFile::class, function (ContainerInterface $c) { |
|
353 | + $this->registerService(IFile::class, function(ContainerInterface $c) { |
|
354 | 354 | $util = new Encryption\Util( |
355 | 355 | new View(), |
356 | 356 | $c->get(IUserManager::class), |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | |
367 | 367 | /** @deprecated 21.0.0 */ |
368 | 368 | $this->registerDeprecatedAlias('EncryptionKeyStorage', IStorage::class); |
369 | - $this->registerService(IStorage::class, function (ContainerInterface $c) { |
|
369 | + $this->registerService(IStorage::class, function(ContainerInterface $c) { |
|
370 | 370 | $view = new View(); |
371 | 371 | $util = new Encryption\Util( |
372 | 372 | $view, |
@@ -389,22 +389,22 @@ discard block |
||
389 | 389 | /** @deprecated 19.0.0 */ |
390 | 390 | $this->registerDeprecatedAlias('TagManager', \OCP\ITagManager::class); |
391 | 391 | |
392 | - $this->registerService('SystemTagManagerFactory', function (ContainerInterface $c) { |
|
392 | + $this->registerService('SystemTagManagerFactory', function(ContainerInterface $c) { |
|
393 | 393 | /** @var \OCP\IConfig $config */ |
394 | 394 | $config = $c->get(\OCP\IConfig::class); |
395 | 395 | $factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class); |
396 | 396 | return new $factoryClass($this); |
397 | 397 | }); |
398 | - $this->registerService(ISystemTagManager::class, function (ContainerInterface $c) { |
|
398 | + $this->registerService(ISystemTagManager::class, function(ContainerInterface $c) { |
|
399 | 399 | return $c->get('SystemTagManagerFactory')->getManager(); |
400 | 400 | }); |
401 | 401 | /** @deprecated 19.0.0 */ |
402 | 402 | $this->registerDeprecatedAlias('SystemTagManager', ISystemTagManager::class); |
403 | 403 | |
404 | - $this->registerService(ISystemTagObjectMapper::class, function (ContainerInterface $c) { |
|
404 | + $this->registerService(ISystemTagObjectMapper::class, function(ContainerInterface $c) { |
|
405 | 405 | return $c->get('SystemTagManagerFactory')->getObjectMapper(); |
406 | 406 | }); |
407 | - $this->registerService('RootFolder', function (ContainerInterface $c) { |
|
407 | + $this->registerService('RootFolder', function(ContainerInterface $c) { |
|
408 | 408 | $manager = \OC\Files\Filesystem::getMountManager(null); |
409 | 409 | $view = new View(); |
410 | 410 | $root = new Root( |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | |
425 | 425 | return $root; |
426 | 426 | }); |
427 | - $this->registerService(HookConnector::class, function (ContainerInterface $c) { |
|
427 | + $this->registerService(HookConnector::class, function(ContainerInterface $c) { |
|
428 | 428 | return new HookConnector( |
429 | 429 | $c->get(IRootFolder::class), |
430 | 430 | new View(), |
@@ -436,8 +436,8 @@ discard block |
||
436 | 436 | /** @deprecated 19.0.0 */ |
437 | 437 | $this->registerDeprecatedAlias('SystemTagObjectMapper', ISystemTagObjectMapper::class); |
438 | 438 | |
439 | - $this->registerService(IRootFolder::class, function (ContainerInterface $c) { |
|
440 | - return new LazyRoot(function () use ($c) { |
|
439 | + $this->registerService(IRootFolder::class, function(ContainerInterface $c) { |
|
440 | + return new LazyRoot(function() use ($c) { |
|
441 | 441 | return $c->get('RootFolder'); |
442 | 442 | }); |
443 | 443 | }); |
@@ -448,44 +448,44 @@ discard block |
||
448 | 448 | $this->registerDeprecatedAlias('UserManager', \OC\User\Manager::class); |
449 | 449 | $this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class); |
450 | 450 | |
451 | - $this->registerService(\OCP\IGroupManager::class, function (ContainerInterface $c) { |
|
451 | + $this->registerService(\OCP\IGroupManager::class, function(ContainerInterface $c) { |
|
452 | 452 | $groupManager = new \OC\Group\Manager($this->get(IUserManager::class), $c->get(SymfonyAdapter::class), $this->get(ILogger::class)); |
453 | - $groupManager->listen('\OC\Group', 'preCreate', function ($gid) { |
|
453 | + $groupManager->listen('\OC\Group', 'preCreate', function($gid) { |
|
454 | 454 | /** @var IEventDispatcher $dispatcher */ |
455 | 455 | $dispatcher = $this->get(IEventDispatcher::class); |
456 | 456 | $dispatcher->dispatchTyped(new BeforeGroupCreatedEvent($gid)); |
457 | 457 | }); |
458 | - $groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $group) { |
|
458 | + $groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $group) { |
|
459 | 459 | /** @var IEventDispatcher $dispatcher */ |
460 | 460 | $dispatcher = $this->get(IEventDispatcher::class); |
461 | 461 | $dispatcher->dispatchTyped(new GroupCreatedEvent($group)); |
462 | 462 | }); |
463 | - $groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) { |
|
463 | + $groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) { |
|
464 | 464 | /** @var IEventDispatcher $dispatcher */ |
465 | 465 | $dispatcher = $this->get(IEventDispatcher::class); |
466 | 466 | $dispatcher->dispatchTyped(new BeforeGroupDeletedEvent($group)); |
467 | 467 | }); |
468 | - $groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) { |
|
468 | + $groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) { |
|
469 | 469 | /** @var IEventDispatcher $dispatcher */ |
470 | 470 | $dispatcher = $this->get(IEventDispatcher::class); |
471 | 471 | $dispatcher->dispatchTyped(new GroupDeletedEvent($group)); |
472 | 472 | }); |
473 | - $groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
473 | + $groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
474 | 474 | /** @var IEventDispatcher $dispatcher */ |
475 | 475 | $dispatcher = $this->get(IEventDispatcher::class); |
476 | 476 | $dispatcher->dispatchTyped(new BeforeUserAddedEvent($group, $user)); |
477 | 477 | }); |
478 | - $groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
478 | + $groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
479 | 479 | /** @var IEventDispatcher $dispatcher */ |
480 | 480 | $dispatcher = $this->get(IEventDispatcher::class); |
481 | 481 | $dispatcher->dispatchTyped(new UserAddedEvent($group, $user)); |
482 | 482 | }); |
483 | - $groupManager->listen('\OC\Group', 'preRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
483 | + $groupManager->listen('\OC\Group', 'preRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
484 | 484 | /** @var IEventDispatcher $dispatcher */ |
485 | 485 | $dispatcher = $this->get(IEventDispatcher::class); |
486 | 486 | $dispatcher->dispatchTyped(new BeforeUserRemovedEvent($group, $user)); |
487 | 487 | }); |
488 | - $groupManager->listen('\OC\Group', 'postRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
488 | + $groupManager->listen('\OC\Group', 'postRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
489 | 489 | /** @var IEventDispatcher $dispatcher */ |
490 | 490 | $dispatcher = $this->get(IEventDispatcher::class); |
491 | 491 | $dispatcher->dispatchTyped(new UserRemovedEvent($group, $user)); |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | /** @deprecated 19.0.0 */ |
496 | 496 | $this->registerDeprecatedAlias('GroupManager', \OCP\IGroupManager::class); |
497 | 497 | |
498 | - $this->registerService(Store::class, function (ContainerInterface $c) { |
|
498 | + $this->registerService(Store::class, function(ContainerInterface $c) { |
|
499 | 499 | $session = $c->get(ISession::class); |
500 | 500 | if (\OC::$server->get(SystemConfig::class)->getValue('installed', false)) { |
501 | 501 | $tokenProvider = $c->get(IProvider::class); |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | $this->registerAlias(IStore::class, Store::class); |
509 | 509 | $this->registerAlias(IProvider::class, Authentication\Token\Manager::class); |
510 | 510 | |
511 | - $this->registerService(\OC\User\Session::class, function (Server $c) { |
|
511 | + $this->registerService(\OC\User\Session::class, function(Server $c) { |
|
512 | 512 | $manager = $c->get(IUserManager::class); |
513 | 513 | $session = new \OC\Session\Memory(''); |
514 | 514 | $timeFactory = new TimeFactory(); |
@@ -534,26 +534,26 @@ discard block |
||
534 | 534 | $c->get(IEventDispatcher::class) |
535 | 535 | ); |
536 | 536 | /** @deprecated 21.0.0 use BeforeUserCreatedEvent event with the IEventDispatcher instead */ |
537 | - $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { |
|
537 | + $userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) { |
|
538 | 538 | \OC_Hook::emit('OC_User', 'pre_createUser', ['run' => true, 'uid' => $uid, 'password' => $password]); |
539 | 539 | }); |
540 | 540 | /** @deprecated 21.0.0 use UserCreatedEvent event with the IEventDispatcher instead */ |
541 | - $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { |
|
541 | + $userSession->listen('\OC\User', 'postCreateUser', function($user, $password) { |
|
542 | 542 | /** @var \OC\User\User $user */ |
543 | 543 | \OC_Hook::emit('OC_User', 'post_createUser', ['uid' => $user->getUID(), 'password' => $password]); |
544 | 544 | }); |
545 | 545 | /** @deprecated 21.0.0 use BeforeUserDeletedEvent event with the IEventDispatcher instead */ |
546 | - $userSession->listen('\OC\User', 'preDelete', function ($user) use ($legacyDispatcher) { |
|
546 | + $userSession->listen('\OC\User', 'preDelete', function($user) use ($legacyDispatcher) { |
|
547 | 547 | /** @var \OC\User\User $user */ |
548 | 548 | \OC_Hook::emit('OC_User', 'pre_deleteUser', ['run' => true, 'uid' => $user->getUID()]); |
549 | 549 | $legacyDispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user)); |
550 | 550 | }); |
551 | 551 | /** @deprecated 21.0.0 use UserDeletedEvent event with the IEventDispatcher instead */ |
552 | - $userSession->listen('\OC\User', 'postDelete', function ($user) { |
|
552 | + $userSession->listen('\OC\User', 'postDelete', function($user) { |
|
553 | 553 | /** @var \OC\User\User $user */ |
554 | 554 | \OC_Hook::emit('OC_User', 'post_deleteUser', ['uid' => $user->getUID()]); |
555 | 555 | }); |
556 | - $userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) { |
|
556 | + $userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) { |
|
557 | 557 | /** @var \OC\User\User $user */ |
558 | 558 | \OC_Hook::emit('OC_User', 'pre_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]); |
559 | 559 | |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | $dispatcher = $this->get(IEventDispatcher::class); |
562 | 562 | $dispatcher->dispatchTyped(new BeforePasswordUpdatedEvent($user, $password, $recoveryPassword)); |
563 | 563 | }); |
564 | - $userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) { |
|
564 | + $userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) { |
|
565 | 565 | /** @var \OC\User\User $user */ |
566 | 566 | \OC_Hook::emit('OC_User', 'post_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]); |
567 | 567 | |
@@ -569,14 +569,14 @@ discard block |
||
569 | 569 | $dispatcher = $this->get(IEventDispatcher::class); |
570 | 570 | $dispatcher->dispatchTyped(new PasswordUpdatedEvent($user, $password, $recoveryPassword)); |
571 | 571 | }); |
572 | - $userSession->listen('\OC\User', 'preLogin', function ($uid, $password) { |
|
572 | + $userSession->listen('\OC\User', 'preLogin', function($uid, $password) { |
|
573 | 573 | \OC_Hook::emit('OC_User', 'pre_login', ['run' => true, 'uid' => $uid, 'password' => $password]); |
574 | 574 | |
575 | 575 | /** @var IEventDispatcher $dispatcher */ |
576 | 576 | $dispatcher = $this->get(IEventDispatcher::class); |
577 | 577 | $dispatcher->dispatchTyped(new BeforeUserLoggedInEvent($uid, $password)); |
578 | 578 | }); |
579 | - $userSession->listen('\OC\User', 'postLogin', function ($user, $loginName, $password, $isTokenLogin) { |
|
579 | + $userSession->listen('\OC\User', 'postLogin', function($user, $loginName, $password, $isTokenLogin) { |
|
580 | 580 | /** @var \OC\User\User $user */ |
581 | 581 | \OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'loginName' => $loginName, 'password' => $password, 'isTokenLogin' => $isTokenLogin]); |
582 | 582 | |
@@ -584,12 +584,12 @@ discard block |
||
584 | 584 | $dispatcher = $this->get(IEventDispatcher::class); |
585 | 585 | $dispatcher->dispatchTyped(new UserLoggedInEvent($user, $loginName, $password, $isTokenLogin)); |
586 | 586 | }); |
587 | - $userSession->listen('\OC\User', 'preRememberedLogin', function ($uid) { |
|
587 | + $userSession->listen('\OC\User', 'preRememberedLogin', function($uid) { |
|
588 | 588 | /** @var IEventDispatcher $dispatcher */ |
589 | 589 | $dispatcher = $this->get(IEventDispatcher::class); |
590 | 590 | $dispatcher->dispatchTyped(new BeforeUserLoggedInWithCookieEvent($uid)); |
591 | 591 | }); |
592 | - $userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) { |
|
592 | + $userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) { |
|
593 | 593 | /** @var \OC\User\User $user */ |
594 | 594 | \OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'password' => $password]); |
595 | 595 | |
@@ -597,19 +597,19 @@ discard block |
||
597 | 597 | $dispatcher = $this->get(IEventDispatcher::class); |
598 | 598 | $dispatcher->dispatchTyped(new UserLoggedInWithCookieEvent($user, $password)); |
599 | 599 | }); |
600 | - $userSession->listen('\OC\User', 'logout', function ($user) { |
|
600 | + $userSession->listen('\OC\User', 'logout', function($user) { |
|
601 | 601 | \OC_Hook::emit('OC_User', 'logout', []); |
602 | 602 | |
603 | 603 | /** @var IEventDispatcher $dispatcher */ |
604 | 604 | $dispatcher = $this->get(IEventDispatcher::class); |
605 | 605 | $dispatcher->dispatchTyped(new BeforeUserLoggedOutEvent($user)); |
606 | 606 | }); |
607 | - $userSession->listen('\OC\User', 'postLogout', function ($user) { |
|
607 | + $userSession->listen('\OC\User', 'postLogout', function($user) { |
|
608 | 608 | /** @var IEventDispatcher $dispatcher */ |
609 | 609 | $dispatcher = $this->get(IEventDispatcher::class); |
610 | 610 | $dispatcher->dispatchTyped(new UserLoggedOutEvent($user)); |
611 | 611 | }); |
612 | - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) { |
|
612 | + $userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) { |
|
613 | 613 | /** @var \OC\User\User $user */ |
614 | 614 | \OC_Hook::emit('OC_User', 'changeUser', ['run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue]); |
615 | 615 | |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | $this->registerDeprecatedAlias('AllConfig', \OC\AllConfig::class); |
634 | 634 | $this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class); |
635 | 635 | |
636 | - $this->registerService(\OC\SystemConfig::class, function ($c) use ($config) { |
|
636 | + $this->registerService(\OC\SystemConfig::class, function($c) use ($config) { |
|
637 | 637 | return new \OC\SystemConfig($config); |
638 | 638 | }); |
639 | 639 | /** @deprecated 19.0.0 */ |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | $this->registerDeprecatedAlias('AppConfig', \OC\AppConfig::class); |
644 | 644 | $this->registerAlias(IAppConfig::class, \OC\AppConfig::class); |
645 | 645 | |
646 | - $this->registerService(IFactory::class, function (Server $c) { |
|
646 | + $this->registerService(IFactory::class, function(Server $c) { |
|
647 | 647 | return new \OC\L10N\Factory( |
648 | 648 | $c->get(\OCP\IConfig::class), |
649 | 649 | $c->getRequest(), |
@@ -663,13 +663,13 @@ discard block |
||
663 | 663 | /** @deprecated 19.0.0 */ |
664 | 664 | $this->registerDeprecatedAlias('CategoryFetcher', CategoryFetcher::class); |
665 | 665 | |
666 | - $this->registerService(ICache::class, function ($c) { |
|
666 | + $this->registerService(ICache::class, function($c) { |
|
667 | 667 | return new Cache\File(); |
668 | 668 | }); |
669 | 669 | /** @deprecated 19.0.0 */ |
670 | 670 | $this->registerDeprecatedAlias('UserCache', ICache::class); |
671 | 671 | |
672 | - $this->registerService(Factory::class, function (Server $c) { |
|
672 | + $this->registerService(Factory::class, function(Server $c) { |
|
673 | 673 | $arrayCacheFactory = new \OC\Memcache\Factory('', $c->get(ILogger::class), |
674 | 674 | ArrayCache::class, |
675 | 675 | ArrayCache::class, |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | $version = implode(',', $v); |
685 | 685 | $instanceId = \OC_Util::getInstanceId(); |
686 | 686 | $path = \OC::$SERVERROOT; |
687 | - $prefix = md5($instanceId . '-' . $version . '-' . $path); |
|
687 | + $prefix = md5($instanceId.'-'.$version.'-'.$path); |
|
688 | 688 | return new \OC\Memcache\Factory($prefix, $c->get(ILogger::class), |
689 | 689 | $config->getSystemValue('memcache.local', null), |
690 | 690 | $config->getSystemValue('memcache.distributed', null), |
@@ -697,12 +697,12 @@ discard block |
||
697 | 697 | $this->registerDeprecatedAlias('MemCacheFactory', Factory::class); |
698 | 698 | $this->registerAlias(ICacheFactory::class, Factory::class); |
699 | 699 | |
700 | - $this->registerService('RedisFactory', function (Server $c) { |
|
700 | + $this->registerService('RedisFactory', function(Server $c) { |
|
701 | 701 | $systemConfig = $c->get(SystemConfig::class); |
702 | 702 | return new RedisFactory($systemConfig); |
703 | 703 | }); |
704 | 704 | |
705 | - $this->registerService(\OCP\Activity\IManager::class, function (Server $c) { |
|
705 | + $this->registerService(\OCP\Activity\IManager::class, function(Server $c) { |
|
706 | 706 | $l10n = $this->get(IFactory::class)->get('lib'); |
707 | 707 | return new \OC\Activity\Manager( |
708 | 708 | $c->getRequest(), |
@@ -715,14 +715,14 @@ discard block |
||
715 | 715 | /** @deprecated 19.0.0 */ |
716 | 716 | $this->registerDeprecatedAlias('ActivityManager', \OCP\Activity\IManager::class); |
717 | 717 | |
718 | - $this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) { |
|
718 | + $this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) { |
|
719 | 719 | return new \OC\Activity\EventMerger( |
720 | 720 | $c->getL10N('lib') |
721 | 721 | ); |
722 | 722 | }); |
723 | 723 | $this->registerAlias(IValidator::class, Validator::class); |
724 | 724 | |
725 | - $this->registerService(AvatarManager::class, function (Server $c) { |
|
725 | + $this->registerService(AvatarManager::class, function(Server $c) { |
|
726 | 726 | return new AvatarManager( |
727 | 727 | $c->get(IUserSession::class), |
728 | 728 | $c->get(\OC\User\Manager::class), |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | $this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class); |
742 | 742 | $this->registerAlias(\OCP\Support\Subscription\IRegistry::class, \OC\Support\Subscription\Registry::class); |
743 | 743 | |
744 | - $this->registerService(\OC\Log::class, function (Server $c) { |
|
744 | + $this->registerService(\OC\Log::class, function(Server $c) { |
|
745 | 745 | $logType = $c->get(AllConfig::class)->getSystemValue('log_type', 'file'); |
746 | 746 | $factory = new LogFactory($c, $this->get(SystemConfig::class)); |
747 | 747 | $logger = $factory->get($logType); |
@@ -755,7 +755,7 @@ discard block |
||
755 | 755 | // PSR-3 logger |
756 | 756 | $this->registerAlias(LoggerInterface::class, PsrLoggerAdapter::class); |
757 | 757 | |
758 | - $this->registerService(ILogFactory::class, function (Server $c) { |
|
758 | + $this->registerService(ILogFactory::class, function(Server $c) { |
|
759 | 759 | return new LogFactory($c, $this->get(SystemConfig::class)); |
760 | 760 | }); |
761 | 761 | |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | /** @deprecated 19.0.0 */ |
764 | 764 | $this->registerDeprecatedAlias('JobList', IJobList::class); |
765 | 765 | |
766 | - $this->registerService(Router::class, function (Server $c) { |
|
766 | + $this->registerService(Router::class, function(Server $c) { |
|
767 | 767 | $cacheFactory = $c->get(ICacheFactory::class); |
768 | 768 | $logger = $c->get(ILogger::class); |
769 | 769 | if ($cacheFactory->isLocalCacheAvailable()) { |
@@ -781,7 +781,7 @@ discard block |
||
781 | 781 | /** @deprecated 19.0.0 */ |
782 | 782 | $this->registerDeprecatedAlias('Search', ISearch::class); |
783 | 783 | |
784 | - $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) { |
|
784 | + $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) { |
|
785 | 785 | return new \OC\Security\RateLimiting\Backend\MemoryCache( |
786 | 786 | $this->get(ICacheFactory::class), |
787 | 787 | new \OC\AppFramework\Utility\TimeFactory() |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | $this->registerDeprecatedAlias('CredentialsManager', ICredentialsManager::class); |
806 | 806 | |
807 | 807 | $this->registerAlias(IDBConnection::class, ConnectionAdapter::class); |
808 | - $this->registerService(Connection::class, function (Server $c) { |
|
808 | + $this->registerService(Connection::class, function(Server $c) { |
|
809 | 809 | $systemConfig = $c->get(SystemConfig::class); |
810 | 810 | $factory = new \OC\DB\ConnectionFactory($systemConfig); |
811 | 811 | $type = $systemConfig->getValue('dbtype', 'sqlite'); |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | $this->registerAlias(ICertificateManager::class, CertificateManager::class); |
824 | 824 | $this->registerAlias(IClientService::class, ClientService::class); |
825 | 825 | $this->registerDeprecatedAlias('HttpClientService', IClientService::class); |
826 | - $this->registerService(IEventLogger::class, function (ContainerInterface $c) { |
|
826 | + $this->registerService(IEventLogger::class, function(ContainerInterface $c) { |
|
827 | 827 | $eventLogger = new EventLogger(); |
828 | 828 | if ($c->get(SystemConfig::class)->getValue('debug', false)) { |
829 | 829 | // In debug mode, module is being activated by default |
@@ -834,7 +834,7 @@ discard block |
||
834 | 834 | /** @deprecated 19.0.0 */ |
835 | 835 | $this->registerDeprecatedAlias('EventLogger', IEventLogger::class); |
836 | 836 | |
837 | - $this->registerService(IQueryLogger::class, function (ContainerInterface $c) { |
|
837 | + $this->registerService(IQueryLogger::class, function(ContainerInterface $c) { |
|
838 | 838 | $queryLogger = new QueryLogger(); |
839 | 839 | if ($c->get(SystemConfig::class)->getValue('debug', false)) { |
840 | 840 | // In debug mode, module is being activated by default |
@@ -849,7 +849,7 @@ discard block |
||
849 | 849 | $this->registerDeprecatedAlias('TempManager', TempManager::class); |
850 | 850 | $this->registerAlias(ITempManager::class, TempManager::class); |
851 | 851 | |
852 | - $this->registerService(AppManager::class, function (ContainerInterface $c) { |
|
852 | + $this->registerService(AppManager::class, function(ContainerInterface $c) { |
|
853 | 853 | // TODO: use auto-wiring |
854 | 854 | return new \OC\App\AppManager( |
855 | 855 | $c->get(IUserSession::class), |
@@ -869,7 +869,7 @@ discard block |
||
869 | 869 | /** @deprecated 19.0.0 */ |
870 | 870 | $this->registerDeprecatedAlias('DateTimeZone', IDateTimeZone::class); |
871 | 871 | |
872 | - $this->registerService(IDateTimeFormatter::class, function (Server $c) { |
|
872 | + $this->registerService(IDateTimeFormatter::class, function(Server $c) { |
|
873 | 873 | $language = $c->get(\OCP\IConfig::class)->getUserValue($c->get(ISession::class)->get('user_id'), 'core', 'lang', null); |
874 | 874 | |
875 | 875 | return new DateTimeFormatter( |
@@ -880,7 +880,7 @@ discard block |
||
880 | 880 | /** @deprecated 19.0.0 */ |
881 | 881 | $this->registerDeprecatedAlias('DateTimeFormatter', IDateTimeFormatter::class); |
882 | 882 | |
883 | - $this->registerService(IUserMountCache::class, function (ContainerInterface $c) { |
|
883 | + $this->registerService(IUserMountCache::class, function(ContainerInterface $c) { |
|
884 | 884 | $mountCache = new UserMountCache( |
885 | 885 | $c->get(IDBConnection::class), |
886 | 886 | $c->get(IUserManager::class), |
@@ -893,7 +893,7 @@ discard block |
||
893 | 893 | /** @deprecated 19.0.0 */ |
894 | 894 | $this->registerDeprecatedAlias('UserMountCache', IUserMountCache::class); |
895 | 895 | |
896 | - $this->registerService(IMountProviderCollection::class, function (ContainerInterface $c) { |
|
896 | + $this->registerService(IMountProviderCollection::class, function(ContainerInterface $c) { |
|
897 | 897 | $loader = \OC\Files\Filesystem::getLoader(); |
898 | 898 | $mountCache = $c->get(IUserMountCache::class); |
899 | 899 | $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
@@ -914,7 +914,7 @@ discard block |
||
914 | 914 | |
915 | 915 | /** @deprecated 20.0.0 */ |
916 | 916 | $this->registerDeprecatedAlias('IniWrapper', IniGetWrapper::class); |
917 | - $this->registerService(IBus::class, function (ContainerInterface $c) { |
|
917 | + $this->registerService(IBus::class, function(ContainerInterface $c) { |
|
918 | 918 | $busClass = $c->get(\OCP\IConfig::class)->getSystemValue('commandbus'); |
919 | 919 | if ($busClass) { |
920 | 920 | [$app, $class] = explode('::', $busClass, 2); |
@@ -934,7 +934,7 @@ discard block |
||
934 | 934 | $this->registerDeprecatedAlias('TrustedDomainHelper', TrustedDomainHelper::class); |
935 | 935 | /** @deprecated 19.0.0 */ |
936 | 936 | $this->registerDeprecatedAlias('Throttler', Throttler::class); |
937 | - $this->registerService('IntegrityCodeChecker', function (ContainerInterface $c) { |
|
937 | + $this->registerService('IntegrityCodeChecker', function(ContainerInterface $c) { |
|
938 | 938 | // IConfig and IAppManager requires a working database. This code |
939 | 939 | // might however be called when ownCloud is not yet setup. |
940 | 940 | if (\OC::$server->get(SystemConfig::class)->getValue('installed', false)) { |
@@ -955,7 +955,7 @@ discard block |
||
955 | 955 | $c->get(IMimeTypeDetector::class) |
956 | 956 | ); |
957 | 957 | }); |
958 | - $this->registerService(\OCP\IRequest::class, function (ContainerInterface $c) { |
|
958 | + $this->registerService(\OCP\IRequest::class, function(ContainerInterface $c) { |
|
959 | 959 | if (isset($this['urlParams'])) { |
960 | 960 | $urlParams = $this['urlParams']; |
961 | 961 | } else { |
@@ -992,7 +992,7 @@ discard block |
||
992 | 992 | /** @deprecated 19.0.0 */ |
993 | 993 | $this->registerDeprecatedAlias('Request', \OCP\IRequest::class); |
994 | 994 | |
995 | - $this->registerService(IMailer::class, function (Server $c) { |
|
995 | + $this->registerService(IMailer::class, function(Server $c) { |
|
996 | 996 | return new Mailer( |
997 | 997 | $c->get(\OCP\IConfig::class), |
998 | 998 | $c->get(ILogger::class), |
@@ -1009,7 +1009,7 @@ discard block |
||
1009 | 1009 | /** @deprecated 21.0.0 */ |
1010 | 1010 | $this->registerDeprecatedAlias('LDAPProvider', ILDAPProvider::class); |
1011 | 1011 | |
1012 | - $this->registerService(ILDAPProviderFactory::class, function (ContainerInterface $c) { |
|
1012 | + $this->registerService(ILDAPProviderFactory::class, function(ContainerInterface $c) { |
|
1013 | 1013 | $config = $c->get(\OCP\IConfig::class); |
1014 | 1014 | $factoryClass = $config->getSystemValue('ldapProviderFactory', null); |
1015 | 1015 | if (is_null($factoryClass)) { |
@@ -1018,11 +1018,11 @@ discard block |
||
1018 | 1018 | /** @var \OCP\LDAP\ILDAPProviderFactory $factory */ |
1019 | 1019 | return new $factoryClass($this); |
1020 | 1020 | }); |
1021 | - $this->registerService(ILDAPProvider::class, function (ContainerInterface $c) { |
|
1021 | + $this->registerService(ILDAPProvider::class, function(ContainerInterface $c) { |
|
1022 | 1022 | $factory = $c->get(ILDAPProviderFactory::class); |
1023 | 1023 | return $factory->getLDAPProvider(); |
1024 | 1024 | }); |
1025 | - $this->registerService(ILockingProvider::class, function (ContainerInterface $c) { |
|
1025 | + $this->registerService(ILockingProvider::class, function(ContainerInterface $c) { |
|
1026 | 1026 | $ini = $c->get(IniGetWrapper::class); |
1027 | 1027 | $config = $c->get(\OCP\IConfig::class); |
1028 | 1028 | $ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time'))); |
@@ -1050,12 +1050,12 @@ discard block |
||
1050 | 1050 | /** @deprecated 19.0.0 */ |
1051 | 1051 | $this->registerDeprecatedAlias('MountManager', IMountManager::class); |
1052 | 1052 | |
1053 | - $this->registerService(IMimeTypeDetector::class, function (ContainerInterface $c) { |
|
1053 | + $this->registerService(IMimeTypeDetector::class, function(ContainerInterface $c) { |
|
1054 | 1054 | return new \OC\Files\Type\Detection( |
1055 | 1055 | $c->get(IURLGenerator::class), |
1056 | 1056 | $c->get(ILogger::class), |
1057 | 1057 | \OC::$configDir, |
1058 | - \OC::$SERVERROOT . '/resources/config/' |
|
1058 | + \OC::$SERVERROOT.'/resources/config/' |
|
1059 | 1059 | ); |
1060 | 1060 | }); |
1061 | 1061 | /** @deprecated 19.0.0 */ |
@@ -1064,19 +1064,19 @@ discard block |
||
1064 | 1064 | $this->registerAlias(IMimeTypeLoader::class, Loader::class); |
1065 | 1065 | /** @deprecated 19.0.0 */ |
1066 | 1066 | $this->registerDeprecatedAlias('MimeTypeLoader', IMimeTypeLoader::class); |
1067 | - $this->registerService(BundleFetcher::class, function () { |
|
1067 | + $this->registerService(BundleFetcher::class, function() { |
|
1068 | 1068 | return new BundleFetcher($this->getL10N('lib')); |
1069 | 1069 | }); |
1070 | 1070 | $this->registerAlias(\OCP\Notification\IManager::class, Manager::class); |
1071 | 1071 | /** @deprecated 19.0.0 */ |
1072 | 1072 | $this->registerDeprecatedAlias('NotificationManager', \OCP\Notification\IManager::class); |
1073 | 1073 | |
1074 | - $this->registerService(CapabilitiesManager::class, function (ContainerInterface $c) { |
|
1074 | + $this->registerService(CapabilitiesManager::class, function(ContainerInterface $c) { |
|
1075 | 1075 | $manager = new CapabilitiesManager($c->get(ILogger::class)); |
1076 | - $manager->registerCapability(function () use ($c) { |
|
1076 | + $manager->registerCapability(function() use ($c) { |
|
1077 | 1077 | return new \OC\OCS\CoreCapabilities($c->get(\OCP\IConfig::class)); |
1078 | 1078 | }); |
1079 | - $manager->registerCapability(function () use ($c) { |
|
1079 | + $manager->registerCapability(function() use ($c) { |
|
1080 | 1080 | return $c->get(\OC\Security\Bruteforce\Capabilities::class); |
1081 | 1081 | }); |
1082 | 1082 | return $manager; |
@@ -1084,14 +1084,14 @@ discard block |
||
1084 | 1084 | /** @deprecated 19.0.0 */ |
1085 | 1085 | $this->registerDeprecatedAlias('CapabilitiesManager', CapabilitiesManager::class); |
1086 | 1086 | |
1087 | - $this->registerService(ICommentsManager::class, function (Server $c) { |
|
1087 | + $this->registerService(ICommentsManager::class, function(Server $c) { |
|
1088 | 1088 | $config = $c->get(\OCP\IConfig::class); |
1089 | 1089 | $factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class); |
1090 | 1090 | /** @var \OCP\Comments\ICommentsManagerFactory $factory */ |
1091 | 1091 | $factory = new $factoryClass($this); |
1092 | 1092 | $manager = $factory->getManager(); |
1093 | 1093 | |
1094 | - $manager->registerDisplayNameResolver('user', function ($id) use ($c) { |
|
1094 | + $manager->registerDisplayNameResolver('user', function($id) use ($c) { |
|
1095 | 1095 | $manager = $c->get(IUserManager::class); |
1096 | 1096 | $user = $manager->get($id); |
1097 | 1097 | if (is_null($user)) { |
@@ -1109,7 +1109,7 @@ discard block |
||
1109 | 1109 | $this->registerDeprecatedAlias('CommentsManager', ICommentsManager::class); |
1110 | 1110 | |
1111 | 1111 | $this->registerAlias(\OC_Defaults::class, 'ThemingDefaults'); |
1112 | - $this->registerService('ThemingDefaults', function (Server $c) { |
|
1112 | + $this->registerService('ThemingDefaults', function(Server $c) { |
|
1113 | 1113 | /* |
1114 | 1114 | * Dark magic for autoloader. |
1115 | 1115 | * If we do a class_exists it will try to load the class which will |
@@ -1144,7 +1144,7 @@ discard block |
||
1144 | 1144 | } |
1145 | 1145 | return new \OC_Defaults(); |
1146 | 1146 | }); |
1147 | - $this->registerService(JSCombiner::class, function (Server $c) { |
|
1147 | + $this->registerService(JSCombiner::class, function(Server $c) { |
|
1148 | 1148 | return new JSCombiner( |
1149 | 1149 | $c->getAppDataDir('js'), |
1150 | 1150 | $c->get(IURLGenerator::class), |
@@ -1158,7 +1158,7 @@ discard block |
||
1158 | 1158 | $this->registerDeprecatedAlias('EventDispatcher', \OC\EventDispatcher\SymfonyAdapter::class); |
1159 | 1159 | $this->registerAlias(EventDispatcherInterface::class, \OC\EventDispatcher\SymfonyAdapter::class); |
1160 | 1160 | |
1161 | - $this->registerService('CryptoWrapper', function (ContainerInterface $c) { |
|
1161 | + $this->registerService('CryptoWrapper', function(ContainerInterface $c) { |
|
1162 | 1162 | // FIXME: Instantiiated here due to cyclic dependency |
1163 | 1163 | $request = new Request( |
1164 | 1164 | [ |
@@ -1185,14 +1185,14 @@ discard block |
||
1185 | 1185 | }); |
1186 | 1186 | /** @deprecated 19.0.0 */ |
1187 | 1187 | $this->registerDeprecatedAlias('CsrfTokenManager', CsrfTokenManager::class); |
1188 | - $this->registerService(SessionStorage::class, function (ContainerInterface $c) { |
|
1188 | + $this->registerService(SessionStorage::class, function(ContainerInterface $c) { |
|
1189 | 1189 | return new SessionStorage($c->get(ISession::class)); |
1190 | 1190 | }); |
1191 | 1191 | $this->registerAlias(\OCP\Security\IContentSecurityPolicyManager::class, ContentSecurityPolicyManager::class); |
1192 | 1192 | /** @deprecated 19.0.0 */ |
1193 | 1193 | $this->registerDeprecatedAlias('ContentSecurityPolicyManager', ContentSecurityPolicyManager::class); |
1194 | 1194 | |
1195 | - $this->registerService(\OCP\Share\IManager::class, function (IServerContainer $c) { |
|
1195 | + $this->registerService(\OCP\Share\IManager::class, function(IServerContainer $c) { |
|
1196 | 1196 | $config = $c->get(\OCP\IConfig::class); |
1197 | 1197 | $factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class); |
1198 | 1198 | /** @var \OCP\Share\IProviderFactory $factory */ |
@@ -1222,7 +1222,7 @@ discard block |
||
1222 | 1222 | /** @deprecated 19.0.0 */ |
1223 | 1223 | $this->registerDeprecatedAlias('ShareManager', \OCP\Share\IManager::class); |
1224 | 1224 | |
1225 | - $this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function (Server $c) { |
|
1225 | + $this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function(Server $c) { |
|
1226 | 1226 | $instance = new Collaboration\Collaborators\Search($c); |
1227 | 1227 | |
1228 | 1228 | // register default plugins |
@@ -1245,33 +1245,33 @@ discard block |
||
1245 | 1245 | |
1246 | 1246 | $this->registerDeprecatedAlias('SettingsManager', \OC\Settings\Manager::class); |
1247 | 1247 | $this->registerAlias(\OCP\Settings\IManager::class, \OC\Settings\Manager::class); |
1248 | - $this->registerService(\OC\Files\AppData\Factory::class, function (ContainerInterface $c) { |
|
1248 | + $this->registerService(\OC\Files\AppData\Factory::class, function(ContainerInterface $c) { |
|
1249 | 1249 | return new \OC\Files\AppData\Factory( |
1250 | 1250 | $c->get(IRootFolder::class), |
1251 | 1251 | $c->get(SystemConfig::class) |
1252 | 1252 | ); |
1253 | 1253 | }); |
1254 | 1254 | |
1255 | - $this->registerService('LockdownManager', function (ContainerInterface $c) { |
|
1256 | - return new LockdownManager(function () use ($c) { |
|
1255 | + $this->registerService('LockdownManager', function(ContainerInterface $c) { |
|
1256 | + return new LockdownManager(function() use ($c) { |
|
1257 | 1257 | return $c->get(ISession::class); |
1258 | 1258 | }); |
1259 | 1259 | }); |
1260 | 1260 | |
1261 | - $this->registerService(\OCP\OCS\IDiscoveryService::class, function (ContainerInterface $c) { |
|
1261 | + $this->registerService(\OCP\OCS\IDiscoveryService::class, function(ContainerInterface $c) { |
|
1262 | 1262 | return new DiscoveryService( |
1263 | 1263 | $c->get(ICacheFactory::class), |
1264 | 1264 | $c->get(IClientService::class) |
1265 | 1265 | ); |
1266 | 1266 | }); |
1267 | 1267 | |
1268 | - $this->registerService(ICloudIdManager::class, function (ContainerInterface $c) { |
|
1268 | + $this->registerService(ICloudIdManager::class, function(ContainerInterface $c) { |
|
1269 | 1269 | return new CloudIdManager($c->get(\OCP\Contacts\IManager::class)); |
1270 | 1270 | }); |
1271 | 1271 | |
1272 | 1272 | $this->registerAlias(\OCP\GlobalScale\IConfig::class, \OC\GlobalScale\Config::class); |
1273 | 1273 | |
1274 | - $this->registerService(ICloudFederationProviderManager::class, function (ContainerInterface $c) { |
|
1274 | + $this->registerService(ICloudFederationProviderManager::class, function(ContainerInterface $c) { |
|
1275 | 1275 | return new CloudFederationProviderManager( |
1276 | 1276 | $c->get(IAppManager::class), |
1277 | 1277 | $c->get(IClientService::class), |
@@ -1280,7 +1280,7 @@ discard block |
||
1280 | 1280 | ); |
1281 | 1281 | }); |
1282 | 1282 | |
1283 | - $this->registerService(ICloudFederationFactory::class, function (Server $c) { |
|
1283 | + $this->registerService(ICloudFederationFactory::class, function(Server $c) { |
|
1284 | 1284 | return new CloudFederationFactory(); |
1285 | 1285 | }); |
1286 | 1286 | |
@@ -1292,7 +1292,7 @@ discard block |
||
1292 | 1292 | /** @deprecated 19.0.0 */ |
1293 | 1293 | $this->registerDeprecatedAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class); |
1294 | 1294 | |
1295 | - $this->registerService(Defaults::class, function (Server $c) { |
|
1295 | + $this->registerService(Defaults::class, function(Server $c) { |
|
1296 | 1296 | return new Defaults( |
1297 | 1297 | $c->getThemingDefaults() |
1298 | 1298 | ); |
@@ -1300,17 +1300,17 @@ discard block |
||
1300 | 1300 | /** @deprecated 19.0.0 */ |
1301 | 1301 | $this->registerDeprecatedAlias('Defaults', \OCP\Defaults::class); |
1302 | 1302 | |
1303 | - $this->registerService(\OCP\ISession::class, function (ContainerInterface $c) { |
|
1303 | + $this->registerService(\OCP\ISession::class, function(ContainerInterface $c) { |
|
1304 | 1304 | return $c->get(\OCP\IUserSession::class)->getSession(); |
1305 | 1305 | }, false); |
1306 | 1306 | |
1307 | - $this->registerService(IShareHelper::class, function (ContainerInterface $c) { |
|
1307 | + $this->registerService(IShareHelper::class, function(ContainerInterface $c) { |
|
1308 | 1308 | return new ShareHelper( |
1309 | 1309 | $c->get(\OCP\Share\IManager::class) |
1310 | 1310 | ); |
1311 | 1311 | }); |
1312 | 1312 | |
1313 | - $this->registerService(Installer::class, function (ContainerInterface $c) { |
|
1313 | + $this->registerService(Installer::class, function(ContainerInterface $c) { |
|
1314 | 1314 | return new Installer( |
1315 | 1315 | $c->get(AppFetcher::class), |
1316 | 1316 | $c->get(IClientService::class), |
@@ -1321,11 +1321,11 @@ discard block |
||
1321 | 1321 | ); |
1322 | 1322 | }); |
1323 | 1323 | |
1324 | - $this->registerService(IApiFactory::class, function (ContainerInterface $c) { |
|
1324 | + $this->registerService(IApiFactory::class, function(ContainerInterface $c) { |
|
1325 | 1325 | return new ApiFactory($c->get(IClientService::class)); |
1326 | 1326 | }); |
1327 | 1327 | |
1328 | - $this->registerService(IInstanceFactory::class, function (ContainerInterface $c) { |
|
1328 | + $this->registerService(IInstanceFactory::class, function(ContainerInterface $c) { |
|
1329 | 1329 | $memcacheFactory = $c->get(ICacheFactory::class); |
1330 | 1330 | return new InstanceFactory($memcacheFactory->createLocal('remoteinstance.'), $c->get(IClientService::class)); |
1331 | 1331 | }); |
@@ -1382,7 +1382,7 @@ discard block |
||
1382 | 1382 | $dispatcher = $this->get(SymfonyAdapter::class); |
1383 | 1383 | |
1384 | 1384 | // Delete avatar on user deletion |
1385 | - $dispatcher->addListener('OCP\IUser::preDelete', function (GenericEvent $e) { |
|
1385 | + $dispatcher->addListener('OCP\IUser::preDelete', function(GenericEvent $e) { |
|
1386 | 1386 | $logger = $this->get(ILogger::class); |
1387 | 1387 | $manager = $this->getAvatarManager(); |
1388 | 1388 | /** @var IUser $user */ |
@@ -1395,11 +1395,11 @@ discard block |
||
1395 | 1395 | // no avatar to remove |
1396 | 1396 | } catch (\Exception $e) { |
1397 | 1397 | // Ignore exceptions |
1398 | - $logger->info('Could not cleanup avatar of ' . $user->getUID()); |
|
1398 | + $logger->info('Could not cleanup avatar of '.$user->getUID()); |
|
1399 | 1399 | } |
1400 | 1400 | }); |
1401 | 1401 | |
1402 | - $dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) { |
|
1402 | + $dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) { |
|
1403 | 1403 | $manager = $this->getAvatarManager(); |
1404 | 1404 | /** @var IUser $user */ |
1405 | 1405 | $user = $e->getSubject(); |
@@ -2290,11 +2290,11 @@ discard block |
||
2290 | 2290 | } |
2291 | 2291 | |
2292 | 2292 | private function registerDeprecatedAlias(string $alias, string $target) { |
2293 | - $this->registerService($alias, function (ContainerInterface $container) use ($target, $alias) { |
|
2293 | + $this->registerService($alias, function(ContainerInterface $container) use ($target, $alias) { |
|
2294 | 2294 | try { |
2295 | 2295 | /** @var ILogger $logger */ |
2296 | 2296 | $logger = $container->get(ILogger::class); |
2297 | - $logger->debug('The requested alias "' . $alias . '" is deprecated. Please request "' . $target . '" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']); |
|
2297 | + $logger->debug('The requested alias "'.$alias.'" is deprecated. Please request "'.$target.'" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']); |
|
2298 | 2298 | } catch (ContainerExceptionInterface $e) { |
2299 | 2299 | // Could not get logger. Continue |
2300 | 2300 | } |