@@ -265,10 +265,10 @@ discard block |
||
265 | 265 | $this->registerParameter('isCLI', \OC::$CLI); |
266 | 266 | $this->registerParameter('serverRoot', \OC::$SERVERROOT); |
267 | 267 | |
268 | - $this->registerService(ContainerInterface::class, function (ContainerInterface $c) { |
|
268 | + $this->registerService(ContainerInterface::class, function(ContainerInterface $c) { |
|
269 | 269 | return $c; |
270 | 270 | }); |
271 | - $this->registerService(\OCP\IServerContainer::class, function (ContainerInterface $c) { |
|
271 | + $this->registerService(\OCP\IServerContainer::class, function(ContainerInterface $c) { |
|
272 | 272 | return $c; |
273 | 273 | }); |
274 | 274 | |
@@ -292,11 +292,11 @@ discard block |
||
292 | 292 | |
293 | 293 | $this->registerAlias(IActionFactory::class, ActionFactory::class); |
294 | 294 | |
295 | - $this->registerService(View::class, function (Server $c) { |
|
295 | + $this->registerService(View::class, function(Server $c) { |
|
296 | 296 | return new View(); |
297 | 297 | }, false); |
298 | 298 | |
299 | - $this->registerService(IPreview::class, function (ContainerInterface $c) { |
|
299 | + $this->registerService(IPreview::class, function(ContainerInterface $c) { |
|
300 | 300 | return new PreviewManager( |
301 | 301 | $c->get(\OCP\IConfig::class), |
302 | 302 | $c->get(IRootFolder::class), |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | /** @deprecated 19.0.0 */ |
313 | 313 | $this->registerDeprecatedAlias('PreviewManager', IPreview::class); |
314 | 314 | |
315 | - $this->registerService(\OC\Preview\Watcher::class, function (ContainerInterface $c) { |
|
315 | + $this->registerService(\OC\Preview\Watcher::class, function(ContainerInterface $c) { |
|
316 | 316 | return new \OC\Preview\Watcher( |
317 | 317 | new \OC\Preview\Storage\Root( |
318 | 318 | $c->get(IRootFolder::class), |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | ); |
322 | 322 | }); |
323 | 323 | |
324 | - $this->registerService(\OCP\Encryption\IManager::class, function (Server $c) { |
|
324 | + $this->registerService(\OCP\Encryption\IManager::class, function(Server $c) { |
|
325 | 325 | $view = new View(); |
326 | 326 | $util = new Encryption\Util( |
327 | 327 | $view, |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | |
344 | 344 | /** @deprecated 21.0.0 */ |
345 | 345 | $this->registerDeprecatedAlias('EncryptionFileHelper', IFile::class); |
346 | - $this->registerService(IFile::class, function (ContainerInterface $c) { |
|
346 | + $this->registerService(IFile::class, function(ContainerInterface $c) { |
|
347 | 347 | $util = new Encryption\Util( |
348 | 348 | new View(), |
349 | 349 | $c->get(IUserManager::class), |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | |
360 | 360 | /** @deprecated 21.0.0 */ |
361 | 361 | $this->registerDeprecatedAlias('EncryptionKeyStorage', IStorage::class); |
362 | - $this->registerService(IStorage::class, function (ContainerInterface $c) { |
|
362 | + $this->registerService(IStorage::class, function(ContainerInterface $c) { |
|
363 | 363 | $view = new View(); |
364 | 364 | $util = new Encryption\Util( |
365 | 365 | $view, |
@@ -382,22 +382,22 @@ discard block |
||
382 | 382 | /** @deprecated 19.0.0 */ |
383 | 383 | $this->registerDeprecatedAlias('TagManager', \OCP\ITagManager::class); |
384 | 384 | |
385 | - $this->registerService('SystemTagManagerFactory', function (ContainerInterface $c) { |
|
385 | + $this->registerService('SystemTagManagerFactory', function(ContainerInterface $c) { |
|
386 | 386 | /** @var \OCP\IConfig $config */ |
387 | 387 | $config = $c->get(\OCP\IConfig::class); |
388 | 388 | $factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class); |
389 | 389 | return new $factoryClass($this); |
390 | 390 | }); |
391 | - $this->registerService(ISystemTagManager::class, function (ContainerInterface $c) { |
|
391 | + $this->registerService(ISystemTagManager::class, function(ContainerInterface $c) { |
|
392 | 392 | return $c->get('SystemTagManagerFactory')->getManager(); |
393 | 393 | }); |
394 | 394 | /** @deprecated 19.0.0 */ |
395 | 395 | $this->registerDeprecatedAlias('SystemTagManager', ISystemTagManager::class); |
396 | 396 | |
397 | - $this->registerService(ISystemTagObjectMapper::class, function (ContainerInterface $c) { |
|
397 | + $this->registerService(ISystemTagObjectMapper::class, function(ContainerInterface $c) { |
|
398 | 398 | return $c->get('SystemTagManagerFactory')->getObjectMapper(); |
399 | 399 | }); |
400 | - $this->registerService('RootFolder', function (ContainerInterface $c) { |
|
400 | + $this->registerService('RootFolder', function(ContainerInterface $c) { |
|
401 | 401 | $manager = \OC\Files\Filesystem::getMountManager(null); |
402 | 402 | $view = new View(); |
403 | 403 | $root = new Root( |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | |
418 | 418 | return $root; |
419 | 419 | }); |
420 | - $this->registerService(HookConnector::class, function (ContainerInterface $c) { |
|
420 | + $this->registerService(HookConnector::class, function(ContainerInterface $c) { |
|
421 | 421 | return new HookConnector( |
422 | 422 | $c->get(IRootFolder::class), |
423 | 423 | new View(), |
@@ -429,8 +429,8 @@ discard block |
||
429 | 429 | /** @deprecated 19.0.0 */ |
430 | 430 | $this->registerDeprecatedAlias('SystemTagObjectMapper', ISystemTagObjectMapper::class); |
431 | 431 | |
432 | - $this->registerService(IRootFolder::class, function (ContainerInterface $c) { |
|
433 | - return new LazyRoot(function () use ($c) { |
|
432 | + $this->registerService(IRootFolder::class, function(ContainerInterface $c) { |
|
433 | + return new LazyRoot(function() use ($c) { |
|
434 | 434 | return $c->get('RootFolder'); |
435 | 435 | }); |
436 | 436 | }); |
@@ -441,44 +441,44 @@ discard block |
||
441 | 441 | $this->registerDeprecatedAlias('UserManager', \OC\User\Manager::class); |
442 | 442 | $this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class); |
443 | 443 | |
444 | - $this->registerService(\OCP\IGroupManager::class, function (ContainerInterface $c) { |
|
444 | + $this->registerService(\OCP\IGroupManager::class, function(ContainerInterface $c) { |
|
445 | 445 | $groupManager = new \OC\Group\Manager($this->get(IUserManager::class), $c->get(SymfonyAdapter::class), $this->get(ILogger::class)); |
446 | - $groupManager->listen('\OC\Group', 'preCreate', function ($gid) { |
|
446 | + $groupManager->listen('\OC\Group', 'preCreate', function($gid) { |
|
447 | 447 | /** @var IEventDispatcher $dispatcher */ |
448 | 448 | $dispatcher = $this->get(IEventDispatcher::class); |
449 | 449 | $dispatcher->dispatchTyped(new BeforeGroupCreatedEvent($gid)); |
450 | 450 | }); |
451 | - $groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $group) { |
|
451 | + $groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $group) { |
|
452 | 452 | /** @var IEventDispatcher $dispatcher */ |
453 | 453 | $dispatcher = $this->get(IEventDispatcher::class); |
454 | 454 | $dispatcher->dispatchTyped(new GroupCreatedEvent($group)); |
455 | 455 | }); |
456 | - $groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) { |
|
456 | + $groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) { |
|
457 | 457 | /** @var IEventDispatcher $dispatcher */ |
458 | 458 | $dispatcher = $this->get(IEventDispatcher::class); |
459 | 459 | $dispatcher->dispatchTyped(new BeforeGroupDeletedEvent($group)); |
460 | 460 | }); |
461 | - $groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) { |
|
461 | + $groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) { |
|
462 | 462 | /** @var IEventDispatcher $dispatcher */ |
463 | 463 | $dispatcher = $this->get(IEventDispatcher::class); |
464 | 464 | $dispatcher->dispatchTyped(new GroupDeletedEvent($group)); |
465 | 465 | }); |
466 | - $groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
466 | + $groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
467 | 467 | /** @var IEventDispatcher $dispatcher */ |
468 | 468 | $dispatcher = $this->get(IEventDispatcher::class); |
469 | 469 | $dispatcher->dispatchTyped(new BeforeUserAddedEvent($group, $user)); |
470 | 470 | }); |
471 | - $groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
471 | + $groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
472 | 472 | /** @var IEventDispatcher $dispatcher */ |
473 | 473 | $dispatcher = $this->get(IEventDispatcher::class); |
474 | 474 | $dispatcher->dispatchTyped(new UserAddedEvent($group, $user)); |
475 | 475 | }); |
476 | - $groupManager->listen('\OC\Group', 'preRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
476 | + $groupManager->listen('\OC\Group', 'preRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
477 | 477 | /** @var IEventDispatcher $dispatcher */ |
478 | 478 | $dispatcher = $this->get(IEventDispatcher::class); |
479 | 479 | $dispatcher->dispatchTyped(new BeforeUserRemovedEvent($group, $user)); |
480 | 480 | }); |
481 | - $groupManager->listen('\OC\Group', 'postRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
481 | + $groupManager->listen('\OC\Group', 'postRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
482 | 482 | /** @var IEventDispatcher $dispatcher */ |
483 | 483 | $dispatcher = $this->get(IEventDispatcher::class); |
484 | 484 | $dispatcher->dispatchTyped(new UserRemovedEvent($group, $user)); |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | /** @deprecated 19.0.0 */ |
489 | 489 | $this->registerDeprecatedAlias('GroupManager', \OCP\IGroupManager::class); |
490 | 490 | |
491 | - $this->registerService(Store::class, function (ContainerInterface $c) { |
|
491 | + $this->registerService(Store::class, function(ContainerInterface $c) { |
|
492 | 492 | $session = $c->get(ISession::class); |
493 | 493 | if (\OC::$server->get(SystemConfig::class)->getValue('installed', false)) { |
494 | 494 | $tokenProvider = $c->get(IProvider::class); |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | $this->registerAlias(IStore::class, Store::class); |
502 | 502 | $this->registerAlias(IProvider::class, Authentication\Token\Manager::class); |
503 | 503 | |
504 | - $this->registerService(\OC\User\Session::class, function (Server $c) { |
|
504 | + $this->registerService(\OC\User\Session::class, function(Server $c) { |
|
505 | 505 | $manager = $c->get(IUserManager::class); |
506 | 506 | $session = new \OC\Session\Memory(''); |
507 | 507 | $timeFactory = new TimeFactory(); |
@@ -527,26 +527,26 @@ discard block |
||
527 | 527 | $c->get(IEventDispatcher::class) |
528 | 528 | ); |
529 | 529 | /** @deprecated 21.0.0 use BeforeUserCreatedEvent event with the IEventDispatcher instead */ |
530 | - $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { |
|
530 | + $userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) { |
|
531 | 531 | \OC_Hook::emit('OC_User', 'pre_createUser', ['run' => true, 'uid' => $uid, 'password' => $password]); |
532 | 532 | }); |
533 | 533 | /** @deprecated 21.0.0 use UserCreatedEvent event with the IEventDispatcher instead */ |
534 | - $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { |
|
534 | + $userSession->listen('\OC\User', 'postCreateUser', function($user, $password) { |
|
535 | 535 | /** @var \OC\User\User $user */ |
536 | 536 | \OC_Hook::emit('OC_User', 'post_createUser', ['uid' => $user->getUID(), 'password' => $password]); |
537 | 537 | }); |
538 | 538 | /** @deprecated 21.0.0 use BeforeUserDeletedEvent event with the IEventDispatcher instead */ |
539 | - $userSession->listen('\OC\User', 'preDelete', function ($user) use ($legacyDispatcher) { |
|
539 | + $userSession->listen('\OC\User', 'preDelete', function($user) use ($legacyDispatcher) { |
|
540 | 540 | /** @var \OC\User\User $user */ |
541 | 541 | \OC_Hook::emit('OC_User', 'pre_deleteUser', ['run' => true, 'uid' => $user->getUID()]); |
542 | 542 | $legacyDispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user)); |
543 | 543 | }); |
544 | 544 | /** @deprecated 21.0.0 use UserDeletedEvent event with the IEventDispatcher instead */ |
545 | - $userSession->listen('\OC\User', 'postDelete', function ($user) { |
|
545 | + $userSession->listen('\OC\User', 'postDelete', function($user) { |
|
546 | 546 | /** @var \OC\User\User $user */ |
547 | 547 | \OC_Hook::emit('OC_User', 'post_deleteUser', ['uid' => $user->getUID()]); |
548 | 548 | }); |
549 | - $userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) { |
|
549 | + $userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) { |
|
550 | 550 | /** @var \OC\User\User $user */ |
551 | 551 | \OC_Hook::emit('OC_User', 'pre_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]); |
552 | 552 | |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | $dispatcher = $this->get(IEventDispatcher::class); |
555 | 555 | $dispatcher->dispatchTyped(new BeforePasswordUpdatedEvent($user, $password, $recoveryPassword)); |
556 | 556 | }); |
557 | - $userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) { |
|
557 | + $userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) { |
|
558 | 558 | /** @var \OC\User\User $user */ |
559 | 559 | \OC_Hook::emit('OC_User', 'post_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]); |
560 | 560 | |
@@ -562,14 +562,14 @@ discard block |
||
562 | 562 | $dispatcher = $this->get(IEventDispatcher::class); |
563 | 563 | $dispatcher->dispatchTyped(new PasswordUpdatedEvent($user, $password, $recoveryPassword)); |
564 | 564 | }); |
565 | - $userSession->listen('\OC\User', 'preLogin', function ($uid, $password) { |
|
565 | + $userSession->listen('\OC\User', 'preLogin', function($uid, $password) { |
|
566 | 566 | \OC_Hook::emit('OC_User', 'pre_login', ['run' => true, 'uid' => $uid, 'password' => $password]); |
567 | 567 | |
568 | 568 | /** @var IEventDispatcher $dispatcher */ |
569 | 569 | $dispatcher = $this->get(IEventDispatcher::class); |
570 | 570 | $dispatcher->dispatchTyped(new BeforeUserLoggedInEvent($uid, $password)); |
571 | 571 | }); |
572 | - $userSession->listen('\OC\User', 'postLogin', function ($user, $loginName, $password, $isTokenLogin) { |
|
572 | + $userSession->listen('\OC\User', 'postLogin', function($user, $loginName, $password, $isTokenLogin) { |
|
573 | 573 | /** @var \OC\User\User $user */ |
574 | 574 | \OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'loginName' => $loginName, 'password' => $password, 'isTokenLogin' => $isTokenLogin]); |
575 | 575 | |
@@ -577,12 +577,12 @@ discard block |
||
577 | 577 | $dispatcher = $this->get(IEventDispatcher::class); |
578 | 578 | $dispatcher->dispatchTyped(new UserLoggedInEvent($user, $loginName, $password, $isTokenLogin)); |
579 | 579 | }); |
580 | - $userSession->listen('\OC\User', 'preRememberedLogin', function ($uid) { |
|
580 | + $userSession->listen('\OC\User', 'preRememberedLogin', function($uid) { |
|
581 | 581 | /** @var IEventDispatcher $dispatcher */ |
582 | 582 | $dispatcher = $this->get(IEventDispatcher::class); |
583 | 583 | $dispatcher->dispatchTyped(new BeforeUserLoggedInWithCookieEvent($uid)); |
584 | 584 | }); |
585 | - $userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) { |
|
585 | + $userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) { |
|
586 | 586 | /** @var \OC\User\User $user */ |
587 | 587 | \OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'password' => $password]); |
588 | 588 | |
@@ -590,19 +590,19 @@ discard block |
||
590 | 590 | $dispatcher = $this->get(IEventDispatcher::class); |
591 | 591 | $dispatcher->dispatchTyped(new UserLoggedInWithCookieEvent($user, $password)); |
592 | 592 | }); |
593 | - $userSession->listen('\OC\User', 'logout', function ($user) { |
|
593 | + $userSession->listen('\OC\User', 'logout', function($user) { |
|
594 | 594 | \OC_Hook::emit('OC_User', 'logout', []); |
595 | 595 | |
596 | 596 | /** @var IEventDispatcher $dispatcher */ |
597 | 597 | $dispatcher = $this->get(IEventDispatcher::class); |
598 | 598 | $dispatcher->dispatchTyped(new BeforeUserLoggedOutEvent($user)); |
599 | 599 | }); |
600 | - $userSession->listen('\OC\User', 'postLogout', function ($user) { |
|
600 | + $userSession->listen('\OC\User', 'postLogout', function($user) { |
|
601 | 601 | /** @var IEventDispatcher $dispatcher */ |
602 | 602 | $dispatcher = $this->get(IEventDispatcher::class); |
603 | 603 | $dispatcher->dispatchTyped(new UserLoggedOutEvent($user)); |
604 | 604 | }); |
605 | - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) { |
|
605 | + $userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) { |
|
606 | 606 | /** @var \OC\User\User $user */ |
607 | 607 | \OC_Hook::emit('OC_User', 'changeUser', ['run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue]); |
608 | 608 | |
@@ -626,7 +626,7 @@ discard block |
||
626 | 626 | $this->registerDeprecatedAlias('AllConfig', \OC\AllConfig::class); |
627 | 627 | $this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class); |
628 | 628 | |
629 | - $this->registerService(\OC\SystemConfig::class, function ($c) use ($config) { |
|
629 | + $this->registerService(\OC\SystemConfig::class, function($c) use ($config) { |
|
630 | 630 | return new \OC\SystemConfig($config); |
631 | 631 | }); |
632 | 632 | /** @deprecated 19.0.0 */ |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | $this->registerDeprecatedAlias('AppConfig', \OC\AppConfig::class); |
637 | 637 | $this->registerAlias(IAppConfig::class, \OC\AppConfig::class); |
638 | 638 | |
639 | - $this->registerService(IFactory::class, function (Server $c) { |
|
639 | + $this->registerService(IFactory::class, function(Server $c) { |
|
640 | 640 | return new \OC\L10N\Factory( |
641 | 641 | $c->get(\OCP\IConfig::class), |
642 | 642 | $c->getRequest(), |
@@ -656,13 +656,13 @@ discard block |
||
656 | 656 | /** @deprecated 19.0.0 */ |
657 | 657 | $this->registerDeprecatedAlias('CategoryFetcher', CategoryFetcher::class); |
658 | 658 | |
659 | - $this->registerService(ICache::class, function ($c) { |
|
659 | + $this->registerService(ICache::class, function($c) { |
|
660 | 660 | return new Cache\File(); |
661 | 661 | }); |
662 | 662 | /** @deprecated 19.0.0 */ |
663 | 663 | $this->registerDeprecatedAlias('UserCache', ICache::class); |
664 | 664 | |
665 | - $this->registerService(Factory::class, function (Server $c) { |
|
665 | + $this->registerService(Factory::class, function(Server $c) { |
|
666 | 666 | $arrayCacheFactory = new \OC\Memcache\Factory('', $c->get(ILogger::class), |
667 | 667 | ArrayCache::class, |
668 | 668 | ArrayCache::class, |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | $version = implode(',', $v); |
678 | 678 | $instanceId = \OC_Util::getInstanceId(); |
679 | 679 | $path = \OC::$SERVERROOT; |
680 | - $prefix = md5($instanceId . '-' . $version . '-' . $path); |
|
680 | + $prefix = md5($instanceId.'-'.$version.'-'.$path); |
|
681 | 681 | return new \OC\Memcache\Factory($prefix, $c->get(ILogger::class), |
682 | 682 | $config->getSystemValue('memcache.local', null), |
683 | 683 | $config->getSystemValue('memcache.distributed', null), |
@@ -690,12 +690,12 @@ discard block |
||
690 | 690 | $this->registerDeprecatedAlias('MemCacheFactory', Factory::class); |
691 | 691 | $this->registerAlias(ICacheFactory::class, Factory::class); |
692 | 692 | |
693 | - $this->registerService('RedisFactory', function (Server $c) { |
|
693 | + $this->registerService('RedisFactory', function(Server $c) { |
|
694 | 694 | $systemConfig = $c->get(SystemConfig::class); |
695 | 695 | return new RedisFactory($systemConfig); |
696 | 696 | }); |
697 | 697 | |
698 | - $this->registerService(\OCP\Activity\IManager::class, function (Server $c) { |
|
698 | + $this->registerService(\OCP\Activity\IManager::class, function(Server $c) { |
|
699 | 699 | $l10n = $this->get(IFactory::class)->get('lib'); |
700 | 700 | return new \OC\Activity\Manager( |
701 | 701 | $c->getRequest(), |
@@ -708,14 +708,14 @@ discard block |
||
708 | 708 | /** @deprecated 19.0.0 */ |
709 | 709 | $this->registerDeprecatedAlias('ActivityManager', \OCP\Activity\IManager::class); |
710 | 710 | |
711 | - $this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) { |
|
711 | + $this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) { |
|
712 | 712 | return new \OC\Activity\EventMerger( |
713 | 713 | $c->getL10N('lib') |
714 | 714 | ); |
715 | 715 | }); |
716 | 716 | $this->registerAlias(IValidator::class, Validator::class); |
717 | 717 | |
718 | - $this->registerService(AvatarManager::class, function (Server $c) { |
|
718 | + $this->registerService(AvatarManager::class, function(Server $c) { |
|
719 | 719 | return new AvatarManager( |
720 | 720 | $c->get(\OC\User\Manager::class), |
721 | 721 | $c->getAppDataDir('avatar'), |
@@ -731,7 +731,7 @@ discard block |
||
731 | 731 | $this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class); |
732 | 732 | $this->registerAlias(\OCP\Support\Subscription\IRegistry::class, \OC\Support\Subscription\Registry::class); |
733 | 733 | |
734 | - $this->registerService(\OC\Log::class, function (Server $c) { |
|
734 | + $this->registerService(\OC\Log::class, function(Server $c) { |
|
735 | 735 | $logType = $c->get(AllConfig::class)->getSystemValue('log_type', 'file'); |
736 | 736 | $factory = new LogFactory($c, $this->get(SystemConfig::class)); |
737 | 737 | $logger = $factory->get($logType); |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | // PSR-3 logger |
746 | 746 | $this->registerAlias(LoggerInterface::class, PsrLoggerAdapter::class); |
747 | 747 | |
748 | - $this->registerService(ILogFactory::class, function (Server $c) { |
|
748 | + $this->registerService(ILogFactory::class, function(Server $c) { |
|
749 | 749 | return new LogFactory($c, $this->get(SystemConfig::class)); |
750 | 750 | }); |
751 | 751 | |
@@ -753,7 +753,7 @@ discard block |
||
753 | 753 | /** @deprecated 19.0.0 */ |
754 | 754 | $this->registerDeprecatedAlias('JobList', IJobList::class); |
755 | 755 | |
756 | - $this->registerService(Router::class, function (Server $c) { |
|
756 | + $this->registerService(Router::class, function(Server $c) { |
|
757 | 757 | $cacheFactory = $c->get(ICacheFactory::class); |
758 | 758 | $logger = $c->get(ILogger::class); |
759 | 759 | if ($cacheFactory->isLocalCacheAvailable()) { |
@@ -771,7 +771,7 @@ discard block |
||
771 | 771 | /** @deprecated 19.0.0 */ |
772 | 772 | $this->registerDeprecatedAlias('Search', ISearch::class); |
773 | 773 | |
774 | - $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) { |
|
774 | + $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) { |
|
775 | 775 | return new \OC\Security\RateLimiting\Backend\MemoryCache( |
776 | 776 | $this->get(ICacheFactory::class), |
777 | 777 | new \OC\AppFramework\Utility\TimeFactory() |
@@ -795,7 +795,7 @@ discard block |
||
795 | 795 | $this->registerDeprecatedAlias('CredentialsManager', ICredentialsManager::class); |
796 | 796 | |
797 | 797 | $this->registerAlias(IDBConnection::class, ConnectionAdapter::class); |
798 | - $this->registerService(Connection::class, function (Server $c) { |
|
798 | + $this->registerService(Connection::class, function(Server $c) { |
|
799 | 799 | $systemConfig = $c->get(SystemConfig::class); |
800 | 800 | $factory = new \OC\DB\ConnectionFactory($systemConfig); |
801 | 801 | $type = $systemConfig->getValue('dbtype', 'sqlite'); |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | $this->registerAlias(ICertificateManager::class, CertificateManager::class); |
814 | 814 | $this->registerAlias(IClientService::class, ClientService::class); |
815 | 815 | $this->registerDeprecatedAlias('HttpClientService', IClientService::class); |
816 | - $this->registerService(IEventLogger::class, function (ContainerInterface $c) { |
|
816 | + $this->registerService(IEventLogger::class, function(ContainerInterface $c) { |
|
817 | 817 | $eventLogger = new EventLogger(); |
818 | 818 | if ($c->get(SystemConfig::class)->getValue('debug', false)) { |
819 | 819 | // In debug mode, module is being activated by default |
@@ -824,7 +824,7 @@ discard block |
||
824 | 824 | /** @deprecated 19.0.0 */ |
825 | 825 | $this->registerDeprecatedAlias('EventLogger', IEventLogger::class); |
826 | 826 | |
827 | - $this->registerService(IQueryLogger::class, function (ContainerInterface $c) { |
|
827 | + $this->registerService(IQueryLogger::class, function(ContainerInterface $c) { |
|
828 | 828 | $queryLogger = new QueryLogger(); |
829 | 829 | if ($c->get(SystemConfig::class)->getValue('debug', false)) { |
830 | 830 | // In debug mode, module is being activated by default |
@@ -839,7 +839,7 @@ discard block |
||
839 | 839 | $this->registerDeprecatedAlias('TempManager', TempManager::class); |
840 | 840 | $this->registerAlias(ITempManager::class, TempManager::class); |
841 | 841 | |
842 | - $this->registerService(AppManager::class, function (ContainerInterface $c) { |
|
842 | + $this->registerService(AppManager::class, function(ContainerInterface $c) { |
|
843 | 843 | // TODO: use auto-wiring |
844 | 844 | return new \OC\App\AppManager( |
845 | 845 | $c->get(IUserSession::class), |
@@ -859,7 +859,7 @@ discard block |
||
859 | 859 | /** @deprecated 19.0.0 */ |
860 | 860 | $this->registerDeprecatedAlias('DateTimeZone', IDateTimeZone::class); |
861 | 861 | |
862 | - $this->registerService(IDateTimeFormatter::class, function (Server $c) { |
|
862 | + $this->registerService(IDateTimeFormatter::class, function(Server $c) { |
|
863 | 863 | $language = $c->get(\OCP\IConfig::class)->getUserValue($c->get(ISession::class)->get('user_id'), 'core', 'lang', null); |
864 | 864 | |
865 | 865 | return new DateTimeFormatter( |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | /** @deprecated 19.0.0 */ |
871 | 871 | $this->registerDeprecatedAlias('DateTimeFormatter', IDateTimeFormatter::class); |
872 | 872 | |
873 | - $this->registerService(IUserMountCache::class, function (ContainerInterface $c) { |
|
873 | + $this->registerService(IUserMountCache::class, function(ContainerInterface $c) { |
|
874 | 874 | $mountCache = new UserMountCache( |
875 | 875 | $c->get(IDBConnection::class), |
876 | 876 | $c->get(IUserManager::class), |
@@ -883,7 +883,7 @@ discard block |
||
883 | 883 | /** @deprecated 19.0.0 */ |
884 | 884 | $this->registerDeprecatedAlias('UserMountCache', IUserMountCache::class); |
885 | 885 | |
886 | - $this->registerService(IMountProviderCollection::class, function (ContainerInterface $c) { |
|
886 | + $this->registerService(IMountProviderCollection::class, function(ContainerInterface $c) { |
|
887 | 887 | $loader = \OC\Files\Filesystem::getLoader(); |
888 | 888 | $mountCache = $c->get(IUserMountCache::class); |
889 | 889 | $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
@@ -904,7 +904,7 @@ discard block |
||
904 | 904 | |
905 | 905 | /** @deprecated 20.0.0 */ |
906 | 906 | $this->registerDeprecatedAlias('IniWrapper', IniGetWrapper::class); |
907 | - $this->registerService(IBus::class, function (ContainerInterface $c) { |
|
907 | + $this->registerService(IBus::class, function(ContainerInterface $c) { |
|
908 | 908 | $busClass = $c->get(\OCP\IConfig::class)->getSystemValue('commandbus'); |
909 | 909 | if ($busClass) { |
910 | 910 | [$app, $class] = explode('::', $busClass, 2); |
@@ -924,7 +924,7 @@ discard block |
||
924 | 924 | $this->registerDeprecatedAlias('TrustedDomainHelper', TrustedDomainHelper::class); |
925 | 925 | /** @deprecated 19.0.0 */ |
926 | 926 | $this->registerDeprecatedAlias('Throttler', Throttler::class); |
927 | - $this->registerService('IntegrityCodeChecker', function (ContainerInterface $c) { |
|
927 | + $this->registerService('IntegrityCodeChecker', function(ContainerInterface $c) { |
|
928 | 928 | // IConfig and IAppManager requires a working database. This code |
929 | 929 | // might however be called when ownCloud is not yet setup. |
930 | 930 | if (\OC::$server->get(SystemConfig::class)->getValue('installed', false)) { |
@@ -945,7 +945,7 @@ discard block |
||
945 | 945 | $c->get(IMimeTypeDetector::class) |
946 | 946 | ); |
947 | 947 | }); |
948 | - $this->registerService(\OCP\IRequest::class, function (ContainerInterface $c) { |
|
948 | + $this->registerService(\OCP\IRequest::class, function(ContainerInterface $c) { |
|
949 | 949 | if (isset($this['urlParams'])) { |
950 | 950 | $urlParams = $this['urlParams']; |
951 | 951 | } else { |
@@ -982,7 +982,7 @@ discard block |
||
982 | 982 | /** @deprecated 19.0.0 */ |
983 | 983 | $this->registerDeprecatedAlias('Request', \OCP\IRequest::class); |
984 | 984 | |
985 | - $this->registerService(IMailer::class, function (Server $c) { |
|
985 | + $this->registerService(IMailer::class, function(Server $c) { |
|
986 | 986 | return new Mailer( |
987 | 987 | $c->get(\OCP\IConfig::class), |
988 | 988 | $c->get(ILogger::class), |
@@ -996,7 +996,7 @@ discard block |
||
996 | 996 | /** @deprecated 19.0.0 */ |
997 | 997 | $this->registerDeprecatedAlias('Mailer', IMailer::class); |
998 | 998 | |
999 | - $this->registerService('LDAPProvider', function (ContainerInterface $c) { |
|
999 | + $this->registerService('LDAPProvider', function(ContainerInterface $c) { |
|
1000 | 1000 | $config = $c->get(\OCP\IConfig::class); |
1001 | 1001 | $factoryClass = $config->getSystemValue('ldapProviderFactory', null); |
1002 | 1002 | if (is_null($factoryClass)) { |
@@ -1006,7 +1006,7 @@ discard block |
||
1006 | 1006 | $factory = new $factoryClass($this); |
1007 | 1007 | return $factory->getLDAPProvider(); |
1008 | 1008 | }); |
1009 | - $this->registerService(ILockingProvider::class, function (ContainerInterface $c) { |
|
1009 | + $this->registerService(ILockingProvider::class, function(ContainerInterface $c) { |
|
1010 | 1010 | $ini = $c->get(IniGetWrapper::class); |
1011 | 1011 | $config = $c->get(\OCP\IConfig::class); |
1012 | 1012 | $ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time'))); |
@@ -1034,12 +1034,12 @@ discard block |
||
1034 | 1034 | /** @deprecated 19.0.0 */ |
1035 | 1035 | $this->registerDeprecatedAlias('MountManager', IMountManager::class); |
1036 | 1036 | |
1037 | - $this->registerService(IMimeTypeDetector::class, function (ContainerInterface $c) { |
|
1037 | + $this->registerService(IMimeTypeDetector::class, function(ContainerInterface $c) { |
|
1038 | 1038 | return new \OC\Files\Type\Detection( |
1039 | 1039 | $c->get(IURLGenerator::class), |
1040 | 1040 | $c->get(ILogger::class), |
1041 | 1041 | \OC::$configDir, |
1042 | - \OC::$SERVERROOT . '/resources/config/' |
|
1042 | + \OC::$SERVERROOT.'/resources/config/' |
|
1043 | 1043 | ); |
1044 | 1044 | }); |
1045 | 1045 | /** @deprecated 19.0.0 */ |
@@ -1048,19 +1048,19 @@ discard block |
||
1048 | 1048 | $this->registerAlias(IMimeTypeLoader::class, Loader::class); |
1049 | 1049 | /** @deprecated 19.0.0 */ |
1050 | 1050 | $this->registerDeprecatedAlias('MimeTypeLoader', IMimeTypeLoader::class); |
1051 | - $this->registerService(BundleFetcher::class, function () { |
|
1051 | + $this->registerService(BundleFetcher::class, function() { |
|
1052 | 1052 | return new BundleFetcher($this->getL10N('lib')); |
1053 | 1053 | }); |
1054 | 1054 | $this->registerAlias(\OCP\Notification\IManager::class, Manager::class); |
1055 | 1055 | /** @deprecated 19.0.0 */ |
1056 | 1056 | $this->registerDeprecatedAlias('NotificationManager', \OCP\Notification\IManager::class); |
1057 | 1057 | |
1058 | - $this->registerService(CapabilitiesManager::class, function (ContainerInterface $c) { |
|
1058 | + $this->registerService(CapabilitiesManager::class, function(ContainerInterface $c) { |
|
1059 | 1059 | $manager = new CapabilitiesManager($c->get(ILogger::class)); |
1060 | - $manager->registerCapability(function () use ($c) { |
|
1060 | + $manager->registerCapability(function() use ($c) { |
|
1061 | 1061 | return new \OC\OCS\CoreCapabilities($c->get(\OCP\IConfig::class)); |
1062 | 1062 | }); |
1063 | - $manager->registerCapability(function () use ($c) { |
|
1063 | + $manager->registerCapability(function() use ($c) { |
|
1064 | 1064 | return $c->get(\OC\Security\Bruteforce\Capabilities::class); |
1065 | 1065 | }); |
1066 | 1066 | return $manager; |
@@ -1068,14 +1068,14 @@ discard block |
||
1068 | 1068 | /** @deprecated 19.0.0 */ |
1069 | 1069 | $this->registerDeprecatedAlias('CapabilitiesManager', CapabilitiesManager::class); |
1070 | 1070 | |
1071 | - $this->registerService(ICommentsManager::class, function (Server $c) { |
|
1071 | + $this->registerService(ICommentsManager::class, function(Server $c) { |
|
1072 | 1072 | $config = $c->get(\OCP\IConfig::class); |
1073 | 1073 | $factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class); |
1074 | 1074 | /** @var \OCP\Comments\ICommentsManagerFactory $factory */ |
1075 | 1075 | $factory = new $factoryClass($this); |
1076 | 1076 | $manager = $factory->getManager(); |
1077 | 1077 | |
1078 | - $manager->registerDisplayNameResolver('user', function ($id) use ($c) { |
|
1078 | + $manager->registerDisplayNameResolver('user', function($id) use ($c) { |
|
1079 | 1079 | $manager = $c->get(IUserManager::class); |
1080 | 1080 | $user = $manager->get($id); |
1081 | 1081 | if (is_null($user)) { |
@@ -1093,7 +1093,7 @@ discard block |
||
1093 | 1093 | $this->registerDeprecatedAlias('CommentsManager', ICommentsManager::class); |
1094 | 1094 | |
1095 | 1095 | $this->registerAlias(\OC_Defaults::class, 'ThemingDefaults'); |
1096 | - $this->registerService('ThemingDefaults', function (Server $c) { |
|
1096 | + $this->registerService('ThemingDefaults', function(Server $c) { |
|
1097 | 1097 | /* |
1098 | 1098 | * Dark magic for autoloader. |
1099 | 1099 | * If we do a class_exists it will try to load the class which will |
@@ -1128,7 +1128,7 @@ discard block |
||
1128 | 1128 | } |
1129 | 1129 | return new \OC_Defaults(); |
1130 | 1130 | }); |
1131 | - $this->registerService(JSCombiner::class, function (Server $c) { |
|
1131 | + $this->registerService(JSCombiner::class, function(Server $c) { |
|
1132 | 1132 | return new JSCombiner( |
1133 | 1133 | $c->getAppDataDir('js'), |
1134 | 1134 | $c->get(IURLGenerator::class), |
@@ -1142,7 +1142,7 @@ discard block |
||
1142 | 1142 | $this->registerDeprecatedAlias('EventDispatcher', \OC\EventDispatcher\SymfonyAdapter::class); |
1143 | 1143 | $this->registerAlias(EventDispatcherInterface::class, \OC\EventDispatcher\SymfonyAdapter::class); |
1144 | 1144 | |
1145 | - $this->registerService('CryptoWrapper', function (ContainerInterface $c) { |
|
1145 | + $this->registerService('CryptoWrapper', function(ContainerInterface $c) { |
|
1146 | 1146 | // FIXME: Instantiiated here due to cyclic dependency |
1147 | 1147 | $request = new Request( |
1148 | 1148 | [ |
@@ -1169,14 +1169,14 @@ discard block |
||
1169 | 1169 | }); |
1170 | 1170 | /** @deprecated 19.0.0 */ |
1171 | 1171 | $this->registerDeprecatedAlias('CsrfTokenManager', CsrfTokenManager::class); |
1172 | - $this->registerService(SessionStorage::class, function (ContainerInterface $c) { |
|
1172 | + $this->registerService(SessionStorage::class, function(ContainerInterface $c) { |
|
1173 | 1173 | return new SessionStorage($c->get(ISession::class)); |
1174 | 1174 | }); |
1175 | 1175 | $this->registerAlias(\OCP\Security\IContentSecurityPolicyManager::class, ContentSecurityPolicyManager::class); |
1176 | 1176 | /** @deprecated 19.0.0 */ |
1177 | 1177 | $this->registerDeprecatedAlias('ContentSecurityPolicyManager', ContentSecurityPolicyManager::class); |
1178 | 1178 | |
1179 | - $this->registerService(\OCP\Share\IManager::class, function (IServerContainer $c) { |
|
1179 | + $this->registerService(\OCP\Share\IManager::class, function(IServerContainer $c) { |
|
1180 | 1180 | $config = $c->get(\OCP\IConfig::class); |
1181 | 1181 | $factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class); |
1182 | 1182 | /** @var \OCP\Share\IProviderFactory $factory */ |
@@ -1206,7 +1206,7 @@ discard block |
||
1206 | 1206 | /** @deprecated 19.0.0 */ |
1207 | 1207 | $this->registerDeprecatedAlias('ShareManager', \OCP\Share\IManager::class); |
1208 | 1208 | |
1209 | - $this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function (Server $c) { |
|
1209 | + $this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function(Server $c) { |
|
1210 | 1210 | $instance = new Collaboration\Collaborators\Search($c); |
1211 | 1211 | |
1212 | 1212 | // register default plugins |
@@ -1229,33 +1229,33 @@ discard block |
||
1229 | 1229 | |
1230 | 1230 | $this->registerDeprecatedAlias('SettingsManager', \OC\Settings\Manager::class); |
1231 | 1231 | $this->registerAlias(\OCP\Settings\IManager::class, \OC\Settings\Manager::class); |
1232 | - $this->registerService(\OC\Files\AppData\Factory::class, function (ContainerInterface $c) { |
|
1232 | + $this->registerService(\OC\Files\AppData\Factory::class, function(ContainerInterface $c) { |
|
1233 | 1233 | return new \OC\Files\AppData\Factory( |
1234 | 1234 | $c->get(IRootFolder::class), |
1235 | 1235 | $c->get(SystemConfig::class) |
1236 | 1236 | ); |
1237 | 1237 | }); |
1238 | 1238 | |
1239 | - $this->registerService('LockdownManager', function (ContainerInterface $c) { |
|
1240 | - return new LockdownManager(function () use ($c) { |
|
1239 | + $this->registerService('LockdownManager', function(ContainerInterface $c) { |
|
1240 | + return new LockdownManager(function() use ($c) { |
|
1241 | 1241 | return $c->get(ISession::class); |
1242 | 1242 | }); |
1243 | 1243 | }); |
1244 | 1244 | |
1245 | - $this->registerService(\OCP\OCS\IDiscoveryService::class, function (ContainerInterface $c) { |
|
1245 | + $this->registerService(\OCP\OCS\IDiscoveryService::class, function(ContainerInterface $c) { |
|
1246 | 1246 | return new DiscoveryService( |
1247 | 1247 | $c->get(ICacheFactory::class), |
1248 | 1248 | $c->get(IClientService::class) |
1249 | 1249 | ); |
1250 | 1250 | }); |
1251 | 1251 | |
1252 | - $this->registerService(ICloudIdManager::class, function (ContainerInterface $c) { |
|
1252 | + $this->registerService(ICloudIdManager::class, function(ContainerInterface $c) { |
|
1253 | 1253 | return new CloudIdManager($c->get(\OCP\Contacts\IManager::class)); |
1254 | 1254 | }); |
1255 | 1255 | |
1256 | 1256 | $this->registerAlias(\OCP\GlobalScale\IConfig::class, \OC\GlobalScale\Config::class); |
1257 | 1257 | |
1258 | - $this->registerService(ICloudFederationProviderManager::class, function (ContainerInterface $c) { |
|
1258 | + $this->registerService(ICloudFederationProviderManager::class, function(ContainerInterface $c) { |
|
1259 | 1259 | return new CloudFederationProviderManager( |
1260 | 1260 | $c->get(IAppManager::class), |
1261 | 1261 | $c->get(IClientService::class), |
@@ -1264,7 +1264,7 @@ discard block |
||
1264 | 1264 | ); |
1265 | 1265 | }); |
1266 | 1266 | |
1267 | - $this->registerService(ICloudFederationFactory::class, function (Server $c) { |
|
1267 | + $this->registerService(ICloudFederationFactory::class, function(Server $c) { |
|
1268 | 1268 | return new CloudFederationFactory(); |
1269 | 1269 | }); |
1270 | 1270 | |
@@ -1276,7 +1276,7 @@ discard block |
||
1276 | 1276 | /** @deprecated 19.0.0 */ |
1277 | 1277 | $this->registerDeprecatedAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class); |
1278 | 1278 | |
1279 | - $this->registerService(Defaults::class, function (Server $c) { |
|
1279 | + $this->registerService(Defaults::class, function(Server $c) { |
|
1280 | 1280 | return new Defaults( |
1281 | 1281 | $c->getThemingDefaults() |
1282 | 1282 | ); |
@@ -1284,17 +1284,17 @@ discard block |
||
1284 | 1284 | /** @deprecated 19.0.0 */ |
1285 | 1285 | $this->registerDeprecatedAlias('Defaults', \OCP\Defaults::class); |
1286 | 1286 | |
1287 | - $this->registerService(\OCP\ISession::class, function (ContainerInterface $c) { |
|
1287 | + $this->registerService(\OCP\ISession::class, function(ContainerInterface $c) { |
|
1288 | 1288 | return $c->get(\OCP\IUserSession::class)->getSession(); |
1289 | 1289 | }, false); |
1290 | 1290 | |
1291 | - $this->registerService(IShareHelper::class, function (ContainerInterface $c) { |
|
1291 | + $this->registerService(IShareHelper::class, function(ContainerInterface $c) { |
|
1292 | 1292 | return new ShareHelper( |
1293 | 1293 | $c->get(\OCP\Share\IManager::class) |
1294 | 1294 | ); |
1295 | 1295 | }); |
1296 | 1296 | |
1297 | - $this->registerService(Installer::class, function (ContainerInterface $c) { |
|
1297 | + $this->registerService(Installer::class, function(ContainerInterface $c) { |
|
1298 | 1298 | return new Installer( |
1299 | 1299 | $c->get(AppFetcher::class), |
1300 | 1300 | $c->get(IClientService::class), |
@@ -1305,11 +1305,11 @@ discard block |
||
1305 | 1305 | ); |
1306 | 1306 | }); |
1307 | 1307 | |
1308 | - $this->registerService(IApiFactory::class, function (ContainerInterface $c) { |
|
1308 | + $this->registerService(IApiFactory::class, function(ContainerInterface $c) { |
|
1309 | 1309 | return new ApiFactory($c->get(IClientService::class)); |
1310 | 1310 | }); |
1311 | 1311 | |
1312 | - $this->registerService(IInstanceFactory::class, function (ContainerInterface $c) { |
|
1312 | + $this->registerService(IInstanceFactory::class, function(ContainerInterface $c) { |
|
1313 | 1313 | $memcacheFactory = $c->get(ICacheFactory::class); |
1314 | 1314 | return new InstanceFactory($memcacheFactory->createLocal('remoteinstance.'), $c->get(IClientService::class)); |
1315 | 1315 | }); |
@@ -1366,7 +1366,7 @@ discard block |
||
1366 | 1366 | $dispatcher = $this->get(SymfonyAdapter::class); |
1367 | 1367 | |
1368 | 1368 | // Delete avatar on user deletion |
1369 | - $dispatcher->addListener('OCP\IUser::preDelete', function (GenericEvent $e) { |
|
1369 | + $dispatcher->addListener('OCP\IUser::preDelete', function(GenericEvent $e) { |
|
1370 | 1370 | $logger = $this->get(ILogger::class); |
1371 | 1371 | $manager = $this->getAvatarManager(); |
1372 | 1372 | /** @var IUser $user */ |
@@ -1379,11 +1379,11 @@ discard block |
||
1379 | 1379 | // no avatar to remove |
1380 | 1380 | } catch (\Exception $e) { |
1381 | 1381 | // Ignore exceptions |
1382 | - $logger->info('Could not cleanup avatar of ' . $user->getUID()); |
|
1382 | + $logger->info('Could not cleanup avatar of '.$user->getUID()); |
|
1383 | 1383 | } |
1384 | 1384 | }); |
1385 | 1385 | |
1386 | - $dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) { |
|
1386 | + $dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) { |
|
1387 | 1387 | $manager = $this->getAvatarManager(); |
1388 | 1388 | /** @var IUser $user */ |
1389 | 1389 | $user = $e->getSubject(); |
@@ -2274,11 +2274,11 @@ discard block |
||
2274 | 2274 | } |
2275 | 2275 | |
2276 | 2276 | private function registerDeprecatedAlias(string $alias, string $target) { |
2277 | - $this->registerService($alias, function (ContainerInterface $container) use ($target, $alias) { |
|
2277 | + $this->registerService($alias, function(ContainerInterface $container) use ($target, $alias) { |
|
2278 | 2278 | try { |
2279 | 2279 | /** @var ILogger $logger */ |
2280 | 2280 | $logger = $container->get(ILogger::class); |
2281 | - $logger->debug('The requested alias "' . $alias . '" is deprecated. Please request "' . $target . '" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']); |
|
2281 | + $logger->debug('The requested alias "'.$alias.'" is deprecated. Please request "'.$target.'" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']); |
|
2282 | 2282 | } catch (ContainerExceptionInterface $e) { |
2283 | 2283 | // Could not get logger. Continue |
2284 | 2284 | } |