@@ -293,10 +293,10 @@ discard block |
||
293 | 293 | $this->registerParameter('isCLI', \OC::$CLI); |
294 | 294 | $this->registerParameter('serverRoot', \OC::$SERVERROOT); |
295 | 295 | |
296 | - $this->registerService(ContainerInterface::class, function (ContainerInterface $c) { |
|
296 | + $this->registerService(ContainerInterface::class, function(ContainerInterface $c) { |
|
297 | 297 | return $c; |
298 | 298 | }); |
299 | - $this->registerService(\OCP\IServerContainer::class, function (ContainerInterface $c) { |
|
299 | + $this->registerService(\OCP\IServerContainer::class, function(ContainerInterface $c) { |
|
300 | 300 | return $c; |
301 | 301 | }); |
302 | 302 | |
@@ -321,11 +321,11 @@ discard block |
||
321 | 321 | |
322 | 322 | $this->registerAlias(IActionFactory::class, ActionFactory::class); |
323 | 323 | |
324 | - $this->registerService(View::class, function (Server $c) { |
|
324 | + $this->registerService(View::class, function(Server $c) { |
|
325 | 325 | return new View(); |
326 | 326 | }, false); |
327 | 327 | |
328 | - $this->registerService(IPreview::class, function (ContainerInterface $c) { |
|
328 | + $this->registerService(IPreview::class, function(ContainerInterface $c) { |
|
329 | 329 | return new PreviewManager( |
330 | 330 | $c->get(\OCP\IConfig::class), |
331 | 331 | $c->get(IRootFolder::class), |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | /** @deprecated 19.0.0 */ |
347 | 347 | $this->registerDeprecatedAlias('PreviewManager', IPreview::class); |
348 | 348 | |
349 | - $this->registerService(\OC\Preview\Watcher::class, function (ContainerInterface $c) { |
|
349 | + $this->registerService(\OC\Preview\Watcher::class, function(ContainerInterface $c) { |
|
350 | 350 | return new \OC\Preview\Watcher( |
351 | 351 | new \OC\Preview\Storage\Root( |
352 | 352 | $c->get(IRootFolder::class), |
@@ -355,11 +355,11 @@ discard block |
||
355 | 355 | ); |
356 | 356 | }); |
357 | 357 | |
358 | - $this->registerService(IProfiler::class, function (Server $c) { |
|
358 | + $this->registerService(IProfiler::class, function(Server $c) { |
|
359 | 359 | return new Profiler($c->get(SystemConfig::class)); |
360 | 360 | }); |
361 | 361 | |
362 | - $this->registerService(\OCP\Encryption\IManager::class, function (Server $c): Encryption\Manager { |
|
362 | + $this->registerService(\OCP\Encryption\IManager::class, function(Server $c): Encryption\Manager { |
|
363 | 363 | $view = new View(); |
364 | 364 | $util = new Encryption\Util( |
365 | 365 | $view, |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | |
382 | 382 | /** @deprecated 21.0.0 */ |
383 | 383 | $this->registerDeprecatedAlias('EncryptionFileHelper', IFile::class); |
384 | - $this->registerService(IFile::class, function (ContainerInterface $c) { |
|
384 | + $this->registerService(IFile::class, function(ContainerInterface $c) { |
|
385 | 385 | $util = new Encryption\Util( |
386 | 386 | new View(), |
387 | 387 | $c->get(IUserManager::class), |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | |
398 | 398 | /** @deprecated 21.0.0 */ |
399 | 399 | $this->registerDeprecatedAlias('EncryptionKeyStorage', IStorage::class); |
400 | - $this->registerService(IStorage::class, function (ContainerInterface $c) { |
|
400 | + $this->registerService(IStorage::class, function(ContainerInterface $c) { |
|
401 | 401 | $view = new View(); |
402 | 402 | $util = new Encryption\Util( |
403 | 403 | $view, |
@@ -420,22 +420,22 @@ discard block |
||
420 | 420 | /** @deprecated 19.0.0 */ |
421 | 421 | $this->registerDeprecatedAlias('TagManager', \OCP\ITagManager::class); |
422 | 422 | |
423 | - $this->registerService('SystemTagManagerFactory', function (ContainerInterface $c) { |
|
423 | + $this->registerService('SystemTagManagerFactory', function(ContainerInterface $c) { |
|
424 | 424 | /** @var \OCP\IConfig $config */ |
425 | 425 | $config = $c->get(\OCP\IConfig::class); |
426 | 426 | $factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class); |
427 | 427 | return new $factoryClass($this); |
428 | 428 | }); |
429 | - $this->registerService(ISystemTagManager::class, function (ContainerInterface $c) { |
|
429 | + $this->registerService(ISystemTagManager::class, function(ContainerInterface $c) { |
|
430 | 430 | return $c->get('SystemTagManagerFactory')->getManager(); |
431 | 431 | }); |
432 | 432 | /** @deprecated 19.0.0 */ |
433 | 433 | $this->registerDeprecatedAlias('SystemTagManager', ISystemTagManager::class); |
434 | 434 | |
435 | - $this->registerService(ISystemTagObjectMapper::class, function (ContainerInterface $c) { |
|
435 | + $this->registerService(ISystemTagObjectMapper::class, function(ContainerInterface $c) { |
|
436 | 436 | return $c->get('SystemTagManagerFactory')->getObjectMapper(); |
437 | 437 | }); |
438 | - $this->registerService('RootFolder', function (ContainerInterface $c) { |
|
438 | + $this->registerService('RootFolder', function(ContainerInterface $c) { |
|
439 | 439 | $manager = \OC\Files\Filesystem::getMountManager(null); |
440 | 440 | $view = new View(); |
441 | 441 | $root = new Root( |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | |
457 | 457 | return $root; |
458 | 458 | }); |
459 | - $this->registerService(HookConnector::class, function (ContainerInterface $c) { |
|
459 | + $this->registerService(HookConnector::class, function(ContainerInterface $c) { |
|
460 | 460 | return new HookConnector( |
461 | 461 | $c->get(IRootFolder::class), |
462 | 462 | new View(), |
@@ -468,8 +468,8 @@ discard block |
||
468 | 468 | /** @deprecated 19.0.0 */ |
469 | 469 | $this->registerDeprecatedAlias('SystemTagObjectMapper', ISystemTagObjectMapper::class); |
470 | 470 | |
471 | - $this->registerService(IRootFolder::class, function (ContainerInterface $c) { |
|
472 | - return new LazyRoot(function () use ($c) { |
|
471 | + $this->registerService(IRootFolder::class, function(ContainerInterface $c) { |
|
472 | + return new LazyRoot(function() use ($c) { |
|
473 | 473 | return $c->get('RootFolder'); |
474 | 474 | }); |
475 | 475 | }); |
@@ -480,53 +480,53 @@ discard block |
||
480 | 480 | $this->registerDeprecatedAlias('UserManager', \OC\User\Manager::class); |
481 | 481 | $this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class); |
482 | 482 | |
483 | - $this->registerService(DisplayNameCache::class, function (ContainerInterface $c) { |
|
483 | + $this->registerService(DisplayNameCache::class, function(ContainerInterface $c) { |
|
484 | 484 | return $c->get(\OC\User\Manager::class)->getDisplayNameCache(); |
485 | 485 | }); |
486 | 486 | |
487 | - $this->registerService(\OCP\IGroupManager::class, function (ContainerInterface $c) { |
|
487 | + $this->registerService(\OCP\IGroupManager::class, function(ContainerInterface $c) { |
|
488 | 488 | $groupManager = new \OC\Group\Manager( |
489 | 489 | $this->get(IUserManager::class), |
490 | 490 | $c->get(SymfonyAdapter::class), |
491 | 491 | $this->get(LoggerInterface::class), |
492 | 492 | $this->get(ICacheFactory::class) |
493 | 493 | ); |
494 | - $groupManager->listen('\OC\Group', 'preCreate', function ($gid) { |
|
494 | + $groupManager->listen('\OC\Group', 'preCreate', function($gid) { |
|
495 | 495 | /** @var IEventDispatcher $dispatcher */ |
496 | 496 | $dispatcher = $this->get(IEventDispatcher::class); |
497 | 497 | $dispatcher->dispatchTyped(new BeforeGroupCreatedEvent($gid)); |
498 | 498 | }); |
499 | - $groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $group) { |
|
499 | + $groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $group) { |
|
500 | 500 | /** @var IEventDispatcher $dispatcher */ |
501 | 501 | $dispatcher = $this->get(IEventDispatcher::class); |
502 | 502 | $dispatcher->dispatchTyped(new GroupCreatedEvent($group)); |
503 | 503 | }); |
504 | - $groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) { |
|
504 | + $groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) { |
|
505 | 505 | /** @var IEventDispatcher $dispatcher */ |
506 | 506 | $dispatcher = $this->get(IEventDispatcher::class); |
507 | 507 | $dispatcher->dispatchTyped(new BeforeGroupDeletedEvent($group)); |
508 | 508 | }); |
509 | - $groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) { |
|
509 | + $groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) { |
|
510 | 510 | /** @var IEventDispatcher $dispatcher */ |
511 | 511 | $dispatcher = $this->get(IEventDispatcher::class); |
512 | 512 | $dispatcher->dispatchTyped(new GroupDeletedEvent($group)); |
513 | 513 | }); |
514 | - $groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
514 | + $groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
515 | 515 | /** @var IEventDispatcher $dispatcher */ |
516 | 516 | $dispatcher = $this->get(IEventDispatcher::class); |
517 | 517 | $dispatcher->dispatchTyped(new BeforeUserAddedEvent($group, $user)); |
518 | 518 | }); |
519 | - $groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
519 | + $groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
520 | 520 | /** @var IEventDispatcher $dispatcher */ |
521 | 521 | $dispatcher = $this->get(IEventDispatcher::class); |
522 | 522 | $dispatcher->dispatchTyped(new UserAddedEvent($group, $user)); |
523 | 523 | }); |
524 | - $groupManager->listen('\OC\Group', 'preRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
524 | + $groupManager->listen('\OC\Group', 'preRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
525 | 525 | /** @var IEventDispatcher $dispatcher */ |
526 | 526 | $dispatcher = $this->get(IEventDispatcher::class); |
527 | 527 | $dispatcher->dispatchTyped(new BeforeUserRemovedEvent($group, $user)); |
528 | 528 | }); |
529 | - $groupManager->listen('\OC\Group', 'postRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
529 | + $groupManager->listen('\OC\Group', 'postRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
530 | 530 | /** @var IEventDispatcher $dispatcher */ |
531 | 531 | $dispatcher = $this->get(IEventDispatcher::class); |
532 | 532 | $dispatcher->dispatchTyped(new UserRemovedEvent($group, $user)); |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | /** @deprecated 19.0.0 */ |
537 | 537 | $this->registerDeprecatedAlias('GroupManager', \OCP\IGroupManager::class); |
538 | 538 | |
539 | - $this->registerService(Store::class, function (ContainerInterface $c) { |
|
539 | + $this->registerService(Store::class, function(ContainerInterface $c) { |
|
540 | 540 | $session = $c->get(ISession::class); |
541 | 541 | if (\OC::$server->get(SystemConfig::class)->getValue('installed', false)) { |
542 | 542 | $tokenProvider = $c->get(IProvider::class); |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | $this->registerAlias(IStore::class, Store::class); |
550 | 550 | $this->registerAlias(IProvider::class, Authentication\Token\Manager::class); |
551 | 551 | |
552 | - $this->registerService(\OC\User\Session::class, function (Server $c) { |
|
552 | + $this->registerService(\OC\User\Session::class, function(Server $c) { |
|
553 | 553 | $manager = $c->get(IUserManager::class); |
554 | 554 | $session = new \OC\Session\Memory(''); |
555 | 555 | $timeFactory = new TimeFactory(); |
@@ -575,26 +575,26 @@ discard block |
||
575 | 575 | $c->get(IEventDispatcher::class) |
576 | 576 | ); |
577 | 577 | /** @deprecated 21.0.0 use BeforeUserCreatedEvent event with the IEventDispatcher instead */ |
578 | - $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { |
|
578 | + $userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) { |
|
579 | 579 | \OC_Hook::emit('OC_User', 'pre_createUser', ['run' => true, 'uid' => $uid, 'password' => $password]); |
580 | 580 | }); |
581 | 581 | /** @deprecated 21.0.0 use UserCreatedEvent event with the IEventDispatcher instead */ |
582 | - $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { |
|
582 | + $userSession->listen('\OC\User', 'postCreateUser', function($user, $password) { |
|
583 | 583 | /** @var \OC\User\User $user */ |
584 | 584 | \OC_Hook::emit('OC_User', 'post_createUser', ['uid' => $user->getUID(), 'password' => $password]); |
585 | 585 | }); |
586 | 586 | /** @deprecated 21.0.0 use BeforeUserDeletedEvent event with the IEventDispatcher instead */ |
587 | - $userSession->listen('\OC\User', 'preDelete', function ($user) use ($legacyDispatcher) { |
|
587 | + $userSession->listen('\OC\User', 'preDelete', function($user) use ($legacyDispatcher) { |
|
588 | 588 | /** @var \OC\User\User $user */ |
589 | 589 | \OC_Hook::emit('OC_User', 'pre_deleteUser', ['run' => true, 'uid' => $user->getUID()]); |
590 | 590 | $legacyDispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user)); |
591 | 591 | }); |
592 | 592 | /** @deprecated 21.0.0 use UserDeletedEvent event with the IEventDispatcher instead */ |
593 | - $userSession->listen('\OC\User', 'postDelete', function ($user) { |
|
593 | + $userSession->listen('\OC\User', 'postDelete', function($user) { |
|
594 | 594 | /** @var \OC\User\User $user */ |
595 | 595 | \OC_Hook::emit('OC_User', 'post_deleteUser', ['uid' => $user->getUID()]); |
596 | 596 | }); |
597 | - $userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) { |
|
597 | + $userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) { |
|
598 | 598 | /** @var \OC\User\User $user */ |
599 | 599 | \OC_Hook::emit('OC_User', 'pre_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]); |
600 | 600 | |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | $dispatcher = $this->get(IEventDispatcher::class); |
603 | 603 | $dispatcher->dispatchTyped(new BeforePasswordUpdatedEvent($user, $password, $recoveryPassword)); |
604 | 604 | }); |
605 | - $userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) { |
|
605 | + $userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) { |
|
606 | 606 | /** @var \OC\User\User $user */ |
607 | 607 | \OC_Hook::emit('OC_User', 'post_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]); |
608 | 608 | |
@@ -610,14 +610,14 @@ discard block |
||
610 | 610 | $dispatcher = $this->get(IEventDispatcher::class); |
611 | 611 | $dispatcher->dispatchTyped(new PasswordUpdatedEvent($user, $password, $recoveryPassword)); |
612 | 612 | }); |
613 | - $userSession->listen('\OC\User', 'preLogin', function ($uid, $password) { |
|
613 | + $userSession->listen('\OC\User', 'preLogin', function($uid, $password) { |
|
614 | 614 | \OC_Hook::emit('OC_User', 'pre_login', ['run' => true, 'uid' => $uid, 'password' => $password]); |
615 | 615 | |
616 | 616 | /** @var IEventDispatcher $dispatcher */ |
617 | 617 | $dispatcher = $this->get(IEventDispatcher::class); |
618 | 618 | $dispatcher->dispatchTyped(new BeforeUserLoggedInEvent($uid, $password)); |
619 | 619 | }); |
620 | - $userSession->listen('\OC\User', 'postLogin', function ($user, $loginName, $password, $isTokenLogin) { |
|
620 | + $userSession->listen('\OC\User', 'postLogin', function($user, $loginName, $password, $isTokenLogin) { |
|
621 | 621 | /** @var \OC\User\User $user */ |
622 | 622 | \OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'loginName' => $loginName, 'password' => $password, 'isTokenLogin' => $isTokenLogin]); |
623 | 623 | |
@@ -625,12 +625,12 @@ discard block |
||
625 | 625 | $dispatcher = $this->get(IEventDispatcher::class); |
626 | 626 | $dispatcher->dispatchTyped(new UserLoggedInEvent($user, $loginName, $password, $isTokenLogin)); |
627 | 627 | }); |
628 | - $userSession->listen('\OC\User', 'preRememberedLogin', function ($uid) { |
|
628 | + $userSession->listen('\OC\User', 'preRememberedLogin', function($uid) { |
|
629 | 629 | /** @var IEventDispatcher $dispatcher */ |
630 | 630 | $dispatcher = $this->get(IEventDispatcher::class); |
631 | 631 | $dispatcher->dispatchTyped(new BeforeUserLoggedInWithCookieEvent($uid)); |
632 | 632 | }); |
633 | - $userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) { |
|
633 | + $userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) { |
|
634 | 634 | /** @var \OC\User\User $user */ |
635 | 635 | \OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'password' => $password]); |
636 | 636 | |
@@ -638,19 +638,19 @@ discard block |
||
638 | 638 | $dispatcher = $this->get(IEventDispatcher::class); |
639 | 639 | $dispatcher->dispatchTyped(new UserLoggedInWithCookieEvent($user, $password)); |
640 | 640 | }); |
641 | - $userSession->listen('\OC\User', 'logout', function ($user) { |
|
641 | + $userSession->listen('\OC\User', 'logout', function($user) { |
|
642 | 642 | \OC_Hook::emit('OC_User', 'logout', []); |
643 | 643 | |
644 | 644 | /** @var IEventDispatcher $dispatcher */ |
645 | 645 | $dispatcher = $this->get(IEventDispatcher::class); |
646 | 646 | $dispatcher->dispatchTyped(new BeforeUserLoggedOutEvent($user)); |
647 | 647 | }); |
648 | - $userSession->listen('\OC\User', 'postLogout', function ($user) { |
|
648 | + $userSession->listen('\OC\User', 'postLogout', function($user) { |
|
649 | 649 | /** @var IEventDispatcher $dispatcher */ |
650 | 650 | $dispatcher = $this->get(IEventDispatcher::class); |
651 | 651 | $dispatcher->dispatchTyped(new UserLoggedOutEvent($user)); |
652 | 652 | }); |
653 | - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) { |
|
653 | + $userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) { |
|
654 | 654 | /** @var \OC\User\User $user */ |
655 | 655 | \OC_Hook::emit('OC_User', 'changeUser', ['run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue]); |
656 | 656 | |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | $this->registerDeprecatedAlias('AllConfig', \OC\AllConfig::class); |
675 | 675 | $this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class); |
676 | 676 | |
677 | - $this->registerService(\OC\SystemConfig::class, function ($c) use ($config) { |
|
677 | + $this->registerService(\OC\SystemConfig::class, function($c) use ($config) { |
|
678 | 678 | return new \OC\SystemConfig($config); |
679 | 679 | }); |
680 | 680 | /** @deprecated 19.0.0 */ |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | $this->registerDeprecatedAlias('AppConfig', \OC\AppConfig::class); |
685 | 685 | $this->registerAlias(IAppConfig::class, \OC\AppConfig::class); |
686 | 686 | |
687 | - $this->registerService(IFactory::class, function (Server $c) { |
|
687 | + $this->registerService(IFactory::class, function(Server $c) { |
|
688 | 688 | return new \OC\L10N\Factory( |
689 | 689 | $c->get(\OCP\IConfig::class), |
690 | 690 | $c->getRequest(), |
@@ -705,13 +705,13 @@ discard block |
||
705 | 705 | /** @deprecated 19.0.0 */ |
706 | 706 | $this->registerDeprecatedAlias('CategoryFetcher', CategoryFetcher::class); |
707 | 707 | |
708 | - $this->registerService(ICache::class, function ($c) { |
|
708 | + $this->registerService(ICache::class, function($c) { |
|
709 | 709 | return new Cache\File(); |
710 | 710 | }); |
711 | 711 | /** @deprecated 19.0.0 */ |
712 | 712 | $this->registerDeprecatedAlias('UserCache', ICache::class); |
713 | 713 | |
714 | - $this->registerService(Factory::class, function (Server $c) { |
|
714 | + $this->registerService(Factory::class, function(Server $c) { |
|
715 | 715 | $profiler = $c->get(IProfiler::class); |
716 | 716 | $arrayCacheFactory = new \OC\Memcache\Factory('', $c->get(LoggerInterface::class), |
717 | 717 | $profiler, |
@@ -737,7 +737,7 @@ discard block |
||
737 | 737 | $version = implode(',', $v); |
738 | 738 | $instanceId = \OC_Util::getInstanceId(); |
739 | 739 | $path = \OC::$SERVERROOT; |
740 | - $prefix = md5($instanceId . '-' . $version . '-' . $path); |
|
740 | + $prefix = md5($instanceId.'-'.$version.'-'.$path); |
|
741 | 741 | return new \OC\Memcache\Factory($prefix, |
742 | 742 | $c->get(LoggerInterface::class), |
743 | 743 | $profiler, |
@@ -753,12 +753,12 @@ discard block |
||
753 | 753 | $this->registerDeprecatedAlias('MemCacheFactory', Factory::class); |
754 | 754 | $this->registerAlias(ICacheFactory::class, Factory::class); |
755 | 755 | |
756 | - $this->registerService('RedisFactory', function (Server $c) { |
|
756 | + $this->registerService('RedisFactory', function(Server $c) { |
|
757 | 757 | $systemConfig = $c->get(SystemConfig::class); |
758 | 758 | return new RedisFactory($systemConfig, $c->getEventLogger()); |
759 | 759 | }); |
760 | 760 | |
761 | - $this->registerService(\OCP\Activity\IManager::class, function (Server $c) { |
|
761 | + $this->registerService(\OCP\Activity\IManager::class, function(Server $c) { |
|
762 | 762 | $l10n = $this->get(IFactory::class)->get('lib'); |
763 | 763 | return new \OC\Activity\Manager( |
764 | 764 | $c->getRequest(), |
@@ -771,14 +771,14 @@ discard block |
||
771 | 771 | /** @deprecated 19.0.0 */ |
772 | 772 | $this->registerDeprecatedAlias('ActivityManager', \OCP\Activity\IManager::class); |
773 | 773 | |
774 | - $this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) { |
|
774 | + $this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) { |
|
775 | 775 | return new \OC\Activity\EventMerger( |
776 | 776 | $c->getL10N('lib') |
777 | 777 | ); |
778 | 778 | }); |
779 | 779 | $this->registerAlias(IValidator::class, Validator::class); |
780 | 780 | |
781 | - $this->registerService(AvatarManager::class, function (Server $c) { |
|
781 | + $this->registerService(AvatarManager::class, function(Server $c) { |
|
782 | 782 | return new AvatarManager( |
783 | 783 | $c->get(IUserSession::class), |
784 | 784 | $c->get(\OC\User\Manager::class), |
@@ -799,7 +799,7 @@ discard block |
||
799 | 799 | $this->registerAlias(\OCP\Support\Subscription\IRegistry::class, \OC\Support\Subscription\Registry::class); |
800 | 800 | $this->registerAlias(\OCP\Support\Subscription\IAssertion::class, \OC\Support\Subscription\Assertion::class); |
801 | 801 | |
802 | - $this->registerService(\OC\Log::class, function (Server $c) { |
|
802 | + $this->registerService(\OC\Log::class, function(Server $c) { |
|
803 | 803 | $logType = $c->get(AllConfig::class)->getSystemValue('log_type', 'file'); |
804 | 804 | $factory = new LogFactory($c, $this->get(SystemConfig::class)); |
805 | 805 | $logger = $factory->get($logType); |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | // PSR-3 logger |
814 | 814 | $this->registerAlias(LoggerInterface::class, PsrLoggerAdapter::class); |
815 | 815 | |
816 | - $this->registerService(ILogFactory::class, function (Server $c) { |
|
816 | + $this->registerService(ILogFactory::class, function(Server $c) { |
|
817 | 817 | return new LogFactory($c, $this->get(SystemConfig::class)); |
818 | 818 | }); |
819 | 819 | |
@@ -821,7 +821,7 @@ discard block |
||
821 | 821 | /** @deprecated 19.0.0 */ |
822 | 822 | $this->registerDeprecatedAlias('JobList', IJobList::class); |
823 | 823 | |
824 | - $this->registerService(Router::class, function (Server $c) { |
|
824 | + $this->registerService(Router::class, function(Server $c) { |
|
825 | 825 | $cacheFactory = $c->get(ICacheFactory::class); |
826 | 826 | if ($cacheFactory->isLocalCacheAvailable()) { |
827 | 827 | $router = $c->resolve(CachingRouter::class); |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | /** @deprecated 19.0.0 */ |
839 | 839 | $this->registerDeprecatedAlias('Search', ISearch::class); |
840 | 840 | |
841 | - $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) { |
|
841 | + $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) { |
|
842 | 842 | $cacheFactory = $c->get(ICacheFactory::class); |
843 | 843 | if ($cacheFactory->isAvailable()) { |
844 | 844 | $backend = new \OC\Security\RateLimiting\Backend\MemoryCacheBackend( |
@@ -874,7 +874,7 @@ discard block |
||
874 | 874 | $this->registerDeprecatedAlias('CredentialsManager', ICredentialsManager::class); |
875 | 875 | |
876 | 876 | $this->registerAlias(IDBConnection::class, ConnectionAdapter::class); |
877 | - $this->registerService(Connection::class, function (Server $c) { |
|
877 | + $this->registerService(Connection::class, function(Server $c) { |
|
878 | 878 | $systemConfig = $c->get(SystemConfig::class); |
879 | 879 | $factory = new \OC\DB\ConnectionFactory($systemConfig); |
880 | 880 | $type = $systemConfig->getValue('dbtype', 'sqlite'); |
@@ -890,19 +890,19 @@ discard block |
||
890 | 890 | |
891 | 891 | $this->registerAlias(ICertificateManager::class, CertificateManager::class); |
892 | 892 | $this->registerAlias(IClientService::class, ClientService::class); |
893 | - $this->registerService(NegativeDnsCache::class, function (ContainerInterface $c) { |
|
893 | + $this->registerService(NegativeDnsCache::class, function(ContainerInterface $c) { |
|
894 | 894 | return new NegativeDnsCache( |
895 | 895 | $c->get(ICacheFactory::class), |
896 | 896 | ); |
897 | 897 | }); |
898 | 898 | $this->registerDeprecatedAlias('HttpClientService', IClientService::class); |
899 | - $this->registerService(IEventLogger::class, function (ContainerInterface $c) { |
|
899 | + $this->registerService(IEventLogger::class, function(ContainerInterface $c) { |
|
900 | 900 | return new EventLogger($c->get(SystemConfig::class), $c->get(LoggerInterface::class), $c->get(Log::class)); |
901 | 901 | }); |
902 | 902 | /** @deprecated 19.0.0 */ |
903 | 903 | $this->registerDeprecatedAlias('EventLogger', IEventLogger::class); |
904 | 904 | |
905 | - $this->registerService(IQueryLogger::class, function (ContainerInterface $c) { |
|
905 | + $this->registerService(IQueryLogger::class, function(ContainerInterface $c) { |
|
906 | 906 | $queryLogger = new QueryLogger(); |
907 | 907 | if ($c->get(SystemConfig::class)->getValue('debug', false)) { |
908 | 908 | // In debug mode, module is being activated by default |
@@ -917,7 +917,7 @@ discard block |
||
917 | 917 | $this->registerDeprecatedAlias('TempManager', TempManager::class); |
918 | 918 | $this->registerAlias(ITempManager::class, TempManager::class); |
919 | 919 | |
920 | - $this->registerService(AppManager::class, function (ContainerInterface $c) { |
|
920 | + $this->registerService(AppManager::class, function(ContainerInterface $c) { |
|
921 | 921 | // TODO: use auto-wiring |
922 | 922 | return new \OC\App\AppManager( |
923 | 923 | $c->get(IUserSession::class), |
@@ -937,7 +937,7 @@ discard block |
||
937 | 937 | /** @deprecated 19.0.0 */ |
938 | 938 | $this->registerDeprecatedAlias('DateTimeZone', IDateTimeZone::class); |
939 | 939 | |
940 | - $this->registerService(IDateTimeFormatter::class, function (Server $c) { |
|
940 | + $this->registerService(IDateTimeFormatter::class, function(Server $c) { |
|
941 | 941 | $language = $c->get(\OCP\IConfig::class)->getUserValue($c->get(ISession::class)->get('user_id'), 'core', 'lang', null); |
942 | 942 | |
943 | 943 | return new DateTimeFormatter( |
@@ -948,7 +948,7 @@ discard block |
||
948 | 948 | /** @deprecated 19.0.0 */ |
949 | 949 | $this->registerDeprecatedAlias('DateTimeFormatter', IDateTimeFormatter::class); |
950 | 950 | |
951 | - $this->registerService(IUserMountCache::class, function (ContainerInterface $c) { |
|
951 | + $this->registerService(IUserMountCache::class, function(ContainerInterface $c) { |
|
952 | 952 | $mountCache = $c->get(UserMountCache::class); |
953 | 953 | $listener = new UserMountCacheListener($mountCache); |
954 | 954 | $listener->listen($c->get(IUserManager::class)); |
@@ -957,7 +957,7 @@ discard block |
||
957 | 957 | /** @deprecated 19.0.0 */ |
958 | 958 | $this->registerDeprecatedAlias('UserMountCache', IUserMountCache::class); |
959 | 959 | |
960 | - $this->registerService(IMountProviderCollection::class, function (ContainerInterface $c) { |
|
960 | + $this->registerService(IMountProviderCollection::class, function(ContainerInterface $c) { |
|
961 | 961 | $loader = $c->get(IStorageFactory::class); |
962 | 962 | $mountCache = $c->get(IUserMountCache::class); |
963 | 963 | $eventLogger = $c->get(IEventLogger::class); |
@@ -980,7 +980,7 @@ discard block |
||
980 | 980 | |
981 | 981 | /** @deprecated 20.0.0 */ |
982 | 982 | $this->registerDeprecatedAlias('IniWrapper', IniGetWrapper::class); |
983 | - $this->registerService(IBus::class, function (ContainerInterface $c) { |
|
983 | + $this->registerService(IBus::class, function(ContainerInterface $c) { |
|
984 | 984 | $busClass = $c->get(\OCP\IConfig::class)->getSystemValue('commandbus'); |
985 | 985 | if ($busClass) { |
986 | 986 | [$app, $class] = explode('::', $busClass, 2); |
@@ -1002,7 +1002,7 @@ discard block |
||
1002 | 1002 | /** @deprecated 19.0.0 */ |
1003 | 1003 | $this->registerDeprecatedAlias('Throttler', Throttler::class); |
1004 | 1004 | $this->registerAlias(IThrottler::class, Throttler::class); |
1005 | - $this->registerService('IntegrityCodeChecker', function (ContainerInterface $c) { |
|
1005 | + $this->registerService('IntegrityCodeChecker', function(ContainerInterface $c) { |
|
1006 | 1006 | // IConfig and IAppManager requires a working database. This code |
1007 | 1007 | // might however be called when ownCloud is not yet setup. |
1008 | 1008 | if (\OC::$server->get(SystemConfig::class)->getValue('installed', false)) { |
@@ -1023,7 +1023,7 @@ discard block |
||
1023 | 1023 | $c->get(IMimeTypeDetector::class) |
1024 | 1024 | ); |
1025 | 1025 | }); |
1026 | - $this->registerService(\OCP\IRequest::class, function (ContainerInterface $c) { |
|
1026 | + $this->registerService(\OCP\IRequest::class, function(ContainerInterface $c) { |
|
1027 | 1027 | if (isset($this['urlParams'])) { |
1028 | 1028 | $urlParams = $this['urlParams']; |
1029 | 1029 | } else { |
@@ -1060,14 +1060,14 @@ discard block |
||
1060 | 1060 | /** @deprecated 19.0.0 */ |
1061 | 1061 | $this->registerDeprecatedAlias('Request', \OCP\IRequest::class); |
1062 | 1062 | |
1063 | - $this->registerService(IRequestId::class, function (ContainerInterface $c): IRequestId { |
|
1063 | + $this->registerService(IRequestId::class, function(ContainerInterface $c): IRequestId { |
|
1064 | 1064 | return new RequestId( |
1065 | 1065 | $_SERVER['UNIQUE_ID'] ?? '', |
1066 | 1066 | $this->get(ISecureRandom::class) |
1067 | 1067 | ); |
1068 | 1068 | }); |
1069 | 1069 | |
1070 | - $this->registerService(IMailer::class, function (Server $c) { |
|
1070 | + $this->registerService(IMailer::class, function(Server $c) { |
|
1071 | 1071 | return new Mailer( |
1072 | 1072 | $c->get(\OCP\IConfig::class), |
1073 | 1073 | $c->get(LoggerInterface::class), |
@@ -1084,7 +1084,7 @@ discard block |
||
1084 | 1084 | /** @deprecated 21.0.0 */ |
1085 | 1085 | $this->registerDeprecatedAlias('LDAPProvider', ILDAPProvider::class); |
1086 | 1086 | |
1087 | - $this->registerService(ILDAPProviderFactory::class, function (ContainerInterface $c) { |
|
1087 | + $this->registerService(ILDAPProviderFactory::class, function(ContainerInterface $c) { |
|
1088 | 1088 | $config = $c->get(\OCP\IConfig::class); |
1089 | 1089 | $factoryClass = $config->getSystemValue('ldapProviderFactory', null); |
1090 | 1090 | if (is_null($factoryClass) || !class_exists($factoryClass)) { |
@@ -1093,11 +1093,11 @@ discard block |
||
1093 | 1093 | /** @var \OCP\LDAP\ILDAPProviderFactory $factory */ |
1094 | 1094 | return new $factoryClass($this); |
1095 | 1095 | }); |
1096 | - $this->registerService(ILDAPProvider::class, function (ContainerInterface $c) { |
|
1096 | + $this->registerService(ILDAPProvider::class, function(ContainerInterface $c) { |
|
1097 | 1097 | $factory = $c->get(ILDAPProviderFactory::class); |
1098 | 1098 | return $factory->getLDAPProvider(); |
1099 | 1099 | }); |
1100 | - $this->registerService(ILockingProvider::class, function (ContainerInterface $c) { |
|
1100 | + $this->registerService(ILockingProvider::class, function(ContainerInterface $c) { |
|
1101 | 1101 | $ini = $c->get(IniGetWrapper::class); |
1102 | 1102 | $config = $c->get(\OCP\IConfig::class); |
1103 | 1103 | $ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time'))); |
@@ -1120,12 +1120,12 @@ discard block |
||
1120 | 1120 | /** @deprecated 19.0.0 */ |
1121 | 1121 | $this->registerDeprecatedAlias('LockingProvider', ILockingProvider::class); |
1122 | 1122 | |
1123 | - $this->registerService(ILockManager::class, function (Server $c): LockManager { |
|
1123 | + $this->registerService(ILockManager::class, function(Server $c): LockManager { |
|
1124 | 1124 | return new LockManager(); |
1125 | 1125 | }); |
1126 | 1126 | |
1127 | 1127 | $this->registerAlias(ILockdownManager::class, 'LockdownManager'); |
1128 | - $this->registerService(SetupManager::class, function ($c) { |
|
1128 | + $this->registerService(SetupManager::class, function($c) { |
|
1129 | 1129 | // create the setupmanager through the mount manager to resolve the cyclic dependency |
1130 | 1130 | return $c->get(\OC\Files\Mount\Manager::class)->getSetupManager(); |
1131 | 1131 | }); |
@@ -1133,12 +1133,12 @@ discard block |
||
1133 | 1133 | /** @deprecated 19.0.0 */ |
1134 | 1134 | $this->registerDeprecatedAlias('MountManager', IMountManager::class); |
1135 | 1135 | |
1136 | - $this->registerService(IMimeTypeDetector::class, function (ContainerInterface $c) { |
|
1136 | + $this->registerService(IMimeTypeDetector::class, function(ContainerInterface $c) { |
|
1137 | 1137 | return new \OC\Files\Type\Detection( |
1138 | 1138 | $c->get(IURLGenerator::class), |
1139 | 1139 | $c->get(LoggerInterface::class), |
1140 | 1140 | \OC::$configDir, |
1141 | - \OC::$SERVERROOT . '/resources/config/' |
|
1141 | + \OC::$SERVERROOT.'/resources/config/' |
|
1142 | 1142 | ); |
1143 | 1143 | }); |
1144 | 1144 | /** @deprecated 19.0.0 */ |
@@ -1147,22 +1147,22 @@ discard block |
||
1147 | 1147 | $this->registerAlias(IMimeTypeLoader::class, Loader::class); |
1148 | 1148 | /** @deprecated 19.0.0 */ |
1149 | 1149 | $this->registerDeprecatedAlias('MimeTypeLoader', IMimeTypeLoader::class); |
1150 | - $this->registerService(BundleFetcher::class, function () { |
|
1150 | + $this->registerService(BundleFetcher::class, function() { |
|
1151 | 1151 | return new BundleFetcher($this->getL10N('lib')); |
1152 | 1152 | }); |
1153 | 1153 | $this->registerAlias(\OCP\Notification\IManager::class, Manager::class); |
1154 | 1154 | /** @deprecated 19.0.0 */ |
1155 | 1155 | $this->registerDeprecatedAlias('NotificationManager', \OCP\Notification\IManager::class); |
1156 | 1156 | |
1157 | - $this->registerService(CapabilitiesManager::class, function (ContainerInterface $c) { |
|
1157 | + $this->registerService(CapabilitiesManager::class, function(ContainerInterface $c) { |
|
1158 | 1158 | $manager = new CapabilitiesManager($c->get(LoggerInterface::class)); |
1159 | - $manager->registerCapability(function () use ($c) { |
|
1159 | + $manager->registerCapability(function() use ($c) { |
|
1160 | 1160 | return new \OC\OCS\CoreCapabilities($c->get(\OCP\IConfig::class)); |
1161 | 1161 | }); |
1162 | - $manager->registerCapability(function () use ($c) { |
|
1162 | + $manager->registerCapability(function() use ($c) { |
|
1163 | 1163 | return $c->get(\OC\Security\Bruteforce\Capabilities::class); |
1164 | 1164 | }); |
1165 | - $manager->registerCapability(function () use ($c) { |
|
1165 | + $manager->registerCapability(function() use ($c) { |
|
1166 | 1166 | return $c->get(MetadataCapabilities::class); |
1167 | 1167 | }); |
1168 | 1168 | return $manager; |
@@ -1170,14 +1170,14 @@ discard block |
||
1170 | 1170 | /** @deprecated 19.0.0 */ |
1171 | 1171 | $this->registerDeprecatedAlias('CapabilitiesManager', CapabilitiesManager::class); |
1172 | 1172 | |
1173 | - $this->registerService(ICommentsManager::class, function (Server $c) { |
|
1173 | + $this->registerService(ICommentsManager::class, function(Server $c) { |
|
1174 | 1174 | $config = $c->get(\OCP\IConfig::class); |
1175 | 1175 | $factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class); |
1176 | 1176 | /** @var \OCP\Comments\ICommentsManagerFactory $factory */ |
1177 | 1177 | $factory = new $factoryClass($this); |
1178 | 1178 | $manager = $factory->getManager(); |
1179 | 1179 | |
1180 | - $manager->registerDisplayNameResolver('user', function ($id) use ($c) { |
|
1180 | + $manager->registerDisplayNameResolver('user', function($id) use ($c) { |
|
1181 | 1181 | $manager = $c->get(IUserManager::class); |
1182 | 1182 | $userDisplayName = $manager->getDisplayName($id); |
1183 | 1183 | if ($userDisplayName === null) { |
@@ -1193,7 +1193,7 @@ discard block |
||
1193 | 1193 | $this->registerDeprecatedAlias('CommentsManager', ICommentsManager::class); |
1194 | 1194 | |
1195 | 1195 | $this->registerAlias(\OC_Defaults::class, 'ThemingDefaults'); |
1196 | - $this->registerService('ThemingDefaults', function (Server $c) { |
|
1196 | + $this->registerService('ThemingDefaults', function(Server $c) { |
|
1197 | 1197 | /* |
1198 | 1198 | * Dark magic for autoloader. |
1199 | 1199 | * If we do a class_exists it will try to load the class which will |
@@ -1230,7 +1230,7 @@ discard block |
||
1230 | 1230 | } |
1231 | 1231 | return new \OC_Defaults(); |
1232 | 1232 | }); |
1233 | - $this->registerService(JSCombiner::class, function (Server $c) { |
|
1233 | + $this->registerService(JSCombiner::class, function(Server $c) { |
|
1234 | 1234 | return new JSCombiner( |
1235 | 1235 | $c->getAppDataDir('js'), |
1236 | 1236 | $c->get(IURLGenerator::class), |
@@ -1244,7 +1244,7 @@ discard block |
||
1244 | 1244 | $this->registerDeprecatedAlias('EventDispatcher', \OC\EventDispatcher\SymfonyAdapter::class); |
1245 | 1245 | $this->registerAlias(EventDispatcherInterface::class, \OC\EventDispatcher\SymfonyAdapter::class); |
1246 | 1246 | |
1247 | - $this->registerService('CryptoWrapper', function (ContainerInterface $c) { |
|
1247 | + $this->registerService('CryptoWrapper', function(ContainerInterface $c) { |
|
1248 | 1248 | // FIXME: Instantiated here due to cyclic dependency |
1249 | 1249 | $request = new Request( |
1250 | 1250 | [ |
@@ -1271,14 +1271,14 @@ discard block |
||
1271 | 1271 | }); |
1272 | 1272 | /** @deprecated 19.0.0 */ |
1273 | 1273 | $this->registerDeprecatedAlias('CsrfTokenManager', CsrfTokenManager::class); |
1274 | - $this->registerService(SessionStorage::class, function (ContainerInterface $c) { |
|
1274 | + $this->registerService(SessionStorage::class, function(ContainerInterface $c) { |
|
1275 | 1275 | return new SessionStorage($c->get(ISession::class)); |
1276 | 1276 | }); |
1277 | 1277 | $this->registerAlias(\OCP\Security\IContentSecurityPolicyManager::class, ContentSecurityPolicyManager::class); |
1278 | 1278 | /** @deprecated 19.0.0 */ |
1279 | 1279 | $this->registerDeprecatedAlias('ContentSecurityPolicyManager', ContentSecurityPolicyManager::class); |
1280 | 1280 | |
1281 | - $this->registerService(\OCP\Share\IManager::class, function (IServerContainer $c) { |
|
1281 | + $this->registerService(\OCP\Share\IManager::class, function(IServerContainer $c) { |
|
1282 | 1282 | $config = $c->get(\OCP\IConfig::class); |
1283 | 1283 | $factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class); |
1284 | 1284 | /** @var \OCP\Share\IProviderFactory $factory */ |
@@ -1310,7 +1310,7 @@ discard block |
||
1310 | 1310 | /** @deprecated 19.0.0 */ |
1311 | 1311 | $this->registerDeprecatedAlias('ShareManager', \OCP\Share\IManager::class); |
1312 | 1312 | |
1313 | - $this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function (Server $c) { |
|
1313 | + $this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function(Server $c) { |
|
1314 | 1314 | $instance = new Collaboration\Collaborators\Search($c); |
1315 | 1315 | |
1316 | 1316 | // register default plugins |
@@ -1335,27 +1335,27 @@ discard block |
||
1335 | 1335 | |
1336 | 1336 | $this->registerDeprecatedAlias('SettingsManager', \OC\Settings\Manager::class); |
1337 | 1337 | $this->registerAlias(\OCP\Settings\IManager::class, \OC\Settings\Manager::class); |
1338 | - $this->registerService(\OC\Files\AppData\Factory::class, function (ContainerInterface $c) { |
|
1338 | + $this->registerService(\OC\Files\AppData\Factory::class, function(ContainerInterface $c) { |
|
1339 | 1339 | return new \OC\Files\AppData\Factory( |
1340 | 1340 | $c->get(IRootFolder::class), |
1341 | 1341 | $c->get(SystemConfig::class) |
1342 | 1342 | ); |
1343 | 1343 | }); |
1344 | 1344 | |
1345 | - $this->registerService('LockdownManager', function (ContainerInterface $c) { |
|
1346 | - return new LockdownManager(function () use ($c) { |
|
1345 | + $this->registerService('LockdownManager', function(ContainerInterface $c) { |
|
1346 | + return new LockdownManager(function() use ($c) { |
|
1347 | 1347 | return $c->get(ISession::class); |
1348 | 1348 | }); |
1349 | 1349 | }); |
1350 | 1350 | |
1351 | - $this->registerService(\OCP\OCS\IDiscoveryService::class, function (ContainerInterface $c) { |
|
1351 | + $this->registerService(\OCP\OCS\IDiscoveryService::class, function(ContainerInterface $c) { |
|
1352 | 1352 | return new DiscoveryService( |
1353 | 1353 | $c->get(ICacheFactory::class), |
1354 | 1354 | $c->get(IClientService::class) |
1355 | 1355 | ); |
1356 | 1356 | }); |
1357 | 1357 | |
1358 | - $this->registerService(ICloudIdManager::class, function (ContainerInterface $c) { |
|
1358 | + $this->registerService(ICloudIdManager::class, function(ContainerInterface $c) { |
|
1359 | 1359 | return new CloudIdManager( |
1360 | 1360 | $c->get(\OCP\Contacts\IManager::class), |
1361 | 1361 | $c->get(IURLGenerator::class), |
@@ -1367,7 +1367,7 @@ discard block |
||
1367 | 1367 | |
1368 | 1368 | $this->registerAlias(\OCP\GlobalScale\IConfig::class, \OC\GlobalScale\Config::class); |
1369 | 1369 | |
1370 | - $this->registerService(ICloudFederationProviderManager::class, function (ContainerInterface $c) { |
|
1370 | + $this->registerService(ICloudFederationProviderManager::class, function(ContainerInterface $c) { |
|
1371 | 1371 | return new CloudFederationProviderManager( |
1372 | 1372 | $c->get(IAppManager::class), |
1373 | 1373 | $c->get(IClientService::class), |
@@ -1376,7 +1376,7 @@ discard block |
||
1376 | 1376 | ); |
1377 | 1377 | }); |
1378 | 1378 | |
1379 | - $this->registerService(ICloudFederationFactory::class, function (Server $c) { |
|
1379 | + $this->registerService(ICloudFederationFactory::class, function(Server $c) { |
|
1380 | 1380 | return new CloudFederationFactory(); |
1381 | 1381 | }); |
1382 | 1382 | |
@@ -1388,7 +1388,7 @@ discard block |
||
1388 | 1388 | /** @deprecated 19.0.0 */ |
1389 | 1389 | $this->registerDeprecatedAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class); |
1390 | 1390 | |
1391 | - $this->registerService(Defaults::class, function (Server $c) { |
|
1391 | + $this->registerService(Defaults::class, function(Server $c) { |
|
1392 | 1392 | return new Defaults( |
1393 | 1393 | $c->getThemingDefaults() |
1394 | 1394 | ); |
@@ -1396,17 +1396,17 @@ discard block |
||
1396 | 1396 | /** @deprecated 19.0.0 */ |
1397 | 1397 | $this->registerDeprecatedAlias('Defaults', \OCP\Defaults::class); |
1398 | 1398 | |
1399 | - $this->registerService(\OCP\ISession::class, function (ContainerInterface $c) { |
|
1399 | + $this->registerService(\OCP\ISession::class, function(ContainerInterface $c) { |
|
1400 | 1400 | return $c->get(\OCP\IUserSession::class)->getSession(); |
1401 | 1401 | }, false); |
1402 | 1402 | |
1403 | - $this->registerService(IShareHelper::class, function (ContainerInterface $c) { |
|
1403 | + $this->registerService(IShareHelper::class, function(ContainerInterface $c) { |
|
1404 | 1404 | return new ShareHelper( |
1405 | 1405 | $c->get(\OCP\Share\IManager::class) |
1406 | 1406 | ); |
1407 | 1407 | }); |
1408 | 1408 | |
1409 | - $this->registerService(Installer::class, function (ContainerInterface $c) { |
|
1409 | + $this->registerService(Installer::class, function(ContainerInterface $c) { |
|
1410 | 1410 | return new Installer( |
1411 | 1411 | $c->get(AppFetcher::class), |
1412 | 1412 | $c->get(IClientService::class), |
@@ -1417,11 +1417,11 @@ discard block |
||
1417 | 1417 | ); |
1418 | 1418 | }); |
1419 | 1419 | |
1420 | - $this->registerService(IApiFactory::class, function (ContainerInterface $c) { |
|
1420 | + $this->registerService(IApiFactory::class, function(ContainerInterface $c) { |
|
1421 | 1421 | return new ApiFactory($c->get(IClientService::class)); |
1422 | 1422 | }); |
1423 | 1423 | |
1424 | - $this->registerService(IInstanceFactory::class, function (ContainerInterface $c) { |
|
1424 | + $this->registerService(IInstanceFactory::class, function(ContainerInterface $c) { |
|
1425 | 1425 | $memcacheFactory = $c->get(ICacheFactory::class); |
1426 | 1426 | return new InstanceFactory($memcacheFactory->createLocal('remoteinstance.'), $c->get(IClientService::class)); |
1427 | 1427 | }); |
@@ -2359,11 +2359,11 @@ discard block |
||
2359 | 2359 | } |
2360 | 2360 | |
2361 | 2361 | private function registerDeprecatedAlias(string $alias, string $target) { |
2362 | - $this->registerService($alias, function (ContainerInterface $container) use ($target, $alias) { |
|
2362 | + $this->registerService($alias, function(ContainerInterface $container) use ($target, $alias) { |
|
2363 | 2363 | try { |
2364 | 2364 | /** @var LoggerInterface $logger */ |
2365 | 2365 | $logger = $container->get(LoggerInterface::class); |
2366 | - $logger->debug('The requested alias "' . $alias . '" is deprecated. Please request "' . $target . '" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']); |
|
2366 | + $logger->debug('The requested alias "'.$alias.'" is deprecated. Please request "'.$target.'" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']); |
|
2367 | 2367 | } catch (ContainerExceptionInterface $e) { |
2368 | 2368 | // Could not get logger. Continue |
2369 | 2369 | } |