@@ -261,10 +261,10 @@ discard block |
||
261 | 261 | $this->registerParameter('isCLI', \OC::$CLI); |
262 | 262 | $this->registerParameter('serverRoot', \OC::$SERVERROOT); |
263 | 263 | |
264 | - $this->registerService(ContainerInterface::class, function (ContainerInterface $c) { |
|
264 | + $this->registerService(ContainerInterface::class, function(ContainerInterface $c) { |
|
265 | 265 | return $c; |
266 | 266 | }); |
267 | - $this->registerService(\OCP\IServerContainer::class, function (ContainerInterface $c) { |
|
267 | + $this->registerService(\OCP\IServerContainer::class, function(ContainerInterface $c) { |
|
268 | 268 | return $c; |
269 | 269 | }); |
270 | 270 | |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | $this->registerAlias(IActionFactory::class, ActionFactory::class); |
290 | 290 | |
291 | 291 | |
292 | - $this->registerService(IPreview::class, function (ContainerInterface $c) { |
|
292 | + $this->registerService(IPreview::class, function(ContainerInterface $c) { |
|
293 | 293 | return new PreviewManager( |
294 | 294 | $c->get(\OCP\IConfig::class), |
295 | 295 | $c->get(IRootFolder::class), |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | /** @deprecated 19.0.0 */ |
306 | 306 | $this->registerDeprecatedAlias('PreviewManager', IPreview::class); |
307 | 307 | |
308 | - $this->registerService(\OC\Preview\Watcher::class, function (ContainerInterface $c) { |
|
308 | + $this->registerService(\OC\Preview\Watcher::class, function(ContainerInterface $c) { |
|
309 | 309 | return new \OC\Preview\Watcher( |
310 | 310 | new \OC\Preview\Storage\Root( |
311 | 311 | $c->get(IRootFolder::class), |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | ); |
315 | 315 | }); |
316 | 316 | |
317 | - $this->registerService(\OCP\Encryption\IManager::class, function (Server $c) { |
|
317 | + $this->registerService(\OCP\Encryption\IManager::class, function(Server $c) { |
|
318 | 318 | $view = new View(); |
319 | 319 | $util = new Encryption\Util( |
320 | 320 | $view, |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | /** @deprecated 19.0.0 */ |
335 | 335 | $this->registerDeprecatedAlias('EncryptionManager', \OCP\Encryption\IManager::class); |
336 | 336 | |
337 | - $this->registerService('EncryptionFileHelper', function (ContainerInterface $c) { |
|
337 | + $this->registerService('EncryptionFileHelper', function(ContainerInterface $c) { |
|
338 | 338 | $util = new Encryption\Util( |
339 | 339 | new View(), |
340 | 340 | $c->get(IUserManager::class), |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | ); |
349 | 349 | }); |
350 | 350 | |
351 | - $this->registerService('EncryptionKeyStorage', function (ContainerInterface $c) { |
|
351 | + $this->registerService('EncryptionKeyStorage', function(ContainerInterface $c) { |
|
352 | 352 | $view = new View(); |
353 | 353 | $util = new Encryption\Util( |
354 | 354 | $view, |
@@ -371,22 +371,22 @@ discard block |
||
371 | 371 | /** @deprecated 19.0.0 */ |
372 | 372 | $this->registerDeprecatedAlias('TagManager', \OCP\ITagManager::class); |
373 | 373 | |
374 | - $this->registerService('SystemTagManagerFactory', function (ContainerInterface $c) { |
|
374 | + $this->registerService('SystemTagManagerFactory', function(ContainerInterface $c) { |
|
375 | 375 | /** @var \OCP\IConfig $config */ |
376 | 376 | $config = $c->get(\OCP\IConfig::class); |
377 | 377 | $factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class); |
378 | 378 | return new $factoryClass($this); |
379 | 379 | }); |
380 | - $this->registerService(ISystemTagManager::class, function (ContainerInterface $c) { |
|
380 | + $this->registerService(ISystemTagManager::class, function(ContainerInterface $c) { |
|
381 | 381 | return $c->get('SystemTagManagerFactory')->getManager(); |
382 | 382 | }); |
383 | 383 | /** @deprecated 19.0.0 */ |
384 | 384 | $this->registerDeprecatedAlias('SystemTagManager', ISystemTagManager::class); |
385 | 385 | |
386 | - $this->registerService(ISystemTagObjectMapper::class, function (ContainerInterface $c) { |
|
386 | + $this->registerService(ISystemTagObjectMapper::class, function(ContainerInterface $c) { |
|
387 | 387 | return $c->get('SystemTagManagerFactory')->getObjectMapper(); |
388 | 388 | }); |
389 | - $this->registerService('RootFolder', function (ContainerInterface $c) { |
|
389 | + $this->registerService('RootFolder', function(ContainerInterface $c) { |
|
390 | 390 | $manager = \OC\Files\Filesystem::getMountManager(null); |
391 | 391 | $view = new View(); |
392 | 392 | $root = new Root( |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | |
407 | 407 | return $root; |
408 | 408 | }); |
409 | - $this->registerService(HookConnector::class, function (ContainerInterface $c) { |
|
409 | + $this->registerService(HookConnector::class, function(ContainerInterface $c) { |
|
410 | 410 | return new HookConnector( |
411 | 411 | $c->get(IRootFolder::class), |
412 | 412 | new View(), |
@@ -418,8 +418,8 @@ discard block |
||
418 | 418 | /** @deprecated 19.0.0 */ |
419 | 419 | $this->registerDeprecatedAlias('SystemTagObjectMapper', ISystemTagObjectMapper::class); |
420 | 420 | |
421 | - $this->registerService(IRootFolder::class, function (ContainerInterface $c) { |
|
422 | - return new LazyRoot(function () use ($c) { |
|
421 | + $this->registerService(IRootFolder::class, function(ContainerInterface $c) { |
|
422 | + return new LazyRoot(function() use ($c) { |
|
423 | 423 | return $c->get('RootFolder'); |
424 | 424 | }); |
425 | 425 | }); |
@@ -430,44 +430,44 @@ discard block |
||
430 | 430 | $this->registerDeprecatedAlias('UserManager', \OC\User\Manager::class); |
431 | 431 | $this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class); |
432 | 432 | |
433 | - $this->registerService(\OCP\IGroupManager::class, function (ContainerInterface $c) { |
|
433 | + $this->registerService(\OCP\IGroupManager::class, function(ContainerInterface $c) { |
|
434 | 434 | $groupManager = new \OC\Group\Manager($this->get(IUserManager::class), $c->get(SymfonyAdapter::class), $this->get(ILogger::class)); |
435 | - $groupManager->listen('\OC\Group', 'preCreate', function ($gid) { |
|
435 | + $groupManager->listen('\OC\Group', 'preCreate', function($gid) { |
|
436 | 436 | \OC_Hook::emit('OC_Group', 'pre_createGroup', ['run' => true, 'gid' => $gid]); |
437 | 437 | |
438 | 438 | /** @var IEventDispatcher $dispatcher */ |
439 | 439 | $dispatcher = $this->get(IEventDispatcher::class); |
440 | 440 | $dispatcher->dispatchTyped(new BeforeGroupCreatedEvent($gid)); |
441 | 441 | }); |
442 | - $groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $group) { |
|
442 | + $groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $group) { |
|
443 | 443 | \OC_Hook::emit('OC_User', 'post_createGroup', ['gid' => $group->getGID()]); |
444 | 444 | |
445 | 445 | /** @var IEventDispatcher $dispatcher */ |
446 | 446 | $dispatcher = $this->get(IEventDispatcher::class); |
447 | 447 | $dispatcher->dispatchTyped(new GroupCreatedEvent($group)); |
448 | 448 | }); |
449 | - $groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) { |
|
449 | + $groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) { |
|
450 | 450 | \OC_Hook::emit('OC_Group', 'pre_deleteGroup', ['run' => true, 'gid' => $group->getGID()]); |
451 | 451 | |
452 | 452 | /** @var IEventDispatcher $dispatcher */ |
453 | 453 | $dispatcher = $this->get(IEventDispatcher::class); |
454 | 454 | $dispatcher->dispatchTyped(new BeforeGroupDeletedEvent($group)); |
455 | 455 | }); |
456 | - $groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) { |
|
456 | + $groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) { |
|
457 | 457 | \OC_Hook::emit('OC_User', 'post_deleteGroup', ['gid' => $group->getGID()]); |
458 | 458 | |
459 | 459 | /** @var IEventDispatcher $dispatcher */ |
460 | 460 | $dispatcher = $this->get(IEventDispatcher::class); |
461 | 461 | $dispatcher->dispatchTyped(new GroupDeletedEvent($group)); |
462 | 462 | }); |
463 | - $groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
463 | + $groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
464 | 464 | \OC_Hook::emit('OC_Group', 'pre_addToGroup', ['run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID()]); |
465 | 465 | |
466 | 466 | /** @var IEventDispatcher $dispatcher */ |
467 | 467 | $dispatcher = $this->get(IEventDispatcher::class); |
468 | 468 | $dispatcher->dispatchTyped(new BeforeUserAddedEvent($group, $user)); |
469 | 469 | }); |
470 | - $groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
470 | + $groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
471 | 471 | \OC_Hook::emit('OC_Group', 'post_addToGroup', ['uid' => $user->getUID(), 'gid' => $group->getGID()]); |
472 | 472 | //Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks |
473 | 473 | \OC_Hook::emit('OC_User', 'post_addToGroup', ['uid' => $user->getUID(), 'gid' => $group->getGID()]); |
@@ -476,12 +476,12 @@ discard block |
||
476 | 476 | $dispatcher = $this->get(IEventDispatcher::class); |
477 | 477 | $dispatcher->dispatchTyped(new UserAddedEvent($group, $user)); |
478 | 478 | }); |
479 | - $groupManager->listen('\OC\Group', 'preRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
479 | + $groupManager->listen('\OC\Group', 'preRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
480 | 480 | /** @var IEventDispatcher $dispatcher */ |
481 | 481 | $dispatcher = $this->get(IEventDispatcher::class); |
482 | 482 | $dispatcher->dispatchTyped(new BeforeUserRemovedEvent($group, $user)); |
483 | 483 | }); |
484 | - $groupManager->listen('\OC\Group', 'postRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
484 | + $groupManager->listen('\OC\Group', 'postRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
485 | 485 | /** @var IEventDispatcher $dispatcher */ |
486 | 486 | $dispatcher = $this->get(IEventDispatcher::class); |
487 | 487 | $dispatcher->dispatchTyped(new UserRemovedEvent($group, $user)); |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | /** @deprecated 19.0.0 */ |
492 | 492 | $this->registerDeprecatedAlias('GroupManager', \OCP\IGroupManager::class); |
493 | 493 | |
494 | - $this->registerService(Store::class, function (ContainerInterface $c) { |
|
494 | + $this->registerService(Store::class, function(ContainerInterface $c) { |
|
495 | 495 | $session = $c->get(ISession::class); |
496 | 496 | if (\OC::$server->get(SystemConfig::class)->getValue('installed', false)) { |
497 | 497 | $tokenProvider = $c->get(IProvider::class); |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | $this->registerAlias(IStore::class, Store::class); |
505 | 505 | $this->registerAlias(IProvider::class, Authentication\Token\Manager::class); |
506 | 506 | |
507 | - $this->registerService(\OC\User\Session::class, function (Server $c) { |
|
507 | + $this->registerService(\OC\User\Session::class, function(Server $c) { |
|
508 | 508 | $manager = $c->get(IUserManager::class); |
509 | 509 | $session = new \OC\Session\Memory(''); |
510 | 510 | $timeFactory = new TimeFactory(); |
@@ -529,14 +529,14 @@ discard block |
||
529 | 529 | $c->get(ILogger::class), |
530 | 530 | $c->get(IEventDispatcher::class) |
531 | 531 | ); |
532 | - $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { |
|
532 | + $userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) { |
|
533 | 533 | \OC_Hook::emit('OC_User', 'pre_createUser', ['run' => true, 'uid' => $uid, 'password' => $password]); |
534 | 534 | |
535 | 535 | /** @var IEventDispatcher $dispatcher */ |
536 | 536 | $dispatcher = $this->get(IEventDispatcher::class); |
537 | 537 | $dispatcher->dispatchTyped(new BeforeUserCreatedEvent($uid, $password)); |
538 | 538 | }); |
539 | - $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { |
|
539 | + $userSession->listen('\OC\User', 'postCreateUser', function($user, $password) { |
|
540 | 540 | /** @var \OC\User\User $user */ |
541 | 541 | \OC_Hook::emit('OC_User', 'post_createUser', ['uid' => $user->getUID(), 'password' => $password]); |
542 | 542 | |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | $dispatcher = $this->get(IEventDispatcher::class); |
545 | 545 | $dispatcher->dispatchTyped(new UserCreatedEvent($user, $password)); |
546 | 546 | }); |
547 | - $userSession->listen('\OC\User', 'preDelete', function ($user) use ($legacyDispatcher) { |
|
547 | + $userSession->listen('\OC\User', 'preDelete', function($user) use ($legacyDispatcher) { |
|
548 | 548 | /** @var \OC\User\User $user */ |
549 | 549 | \OC_Hook::emit('OC_User', 'pre_deleteUser', ['run' => true, 'uid' => $user->getUID()]); |
550 | 550 | $legacyDispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user)); |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | $dispatcher = $this->get(IEventDispatcher::class); |
554 | 554 | $dispatcher->dispatchTyped(new BeforeUserDeletedEvent($user)); |
555 | 555 | }); |
556 | - $userSession->listen('\OC\User', 'postDelete', function ($user) { |
|
556 | + $userSession->listen('\OC\User', 'postDelete', function($user) { |
|
557 | 557 | /** @var \OC\User\User $user */ |
558 | 558 | \OC_Hook::emit('OC_User', 'post_deleteUser', ['uid' => $user->getUID()]); |
559 | 559 | |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | $dispatcher = $this->get(IEventDispatcher::class); |
562 | 562 | $dispatcher->dispatchTyped(new UserDeletedEvent($user)); |
563 | 563 | }); |
564 | - $userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) { |
|
564 | + $userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) { |
|
565 | 565 | /** @var \OC\User\User $user */ |
566 | 566 | \OC_Hook::emit('OC_User', 'pre_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]); |
567 | 567 | |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | $dispatcher = $this->get(IEventDispatcher::class); |
570 | 570 | $dispatcher->dispatchTyped(new BeforePasswordUpdatedEvent($user, $password, $recoveryPassword)); |
571 | 571 | }); |
572 | - $userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) { |
|
572 | + $userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) { |
|
573 | 573 | /** @var \OC\User\User $user */ |
574 | 574 | \OC_Hook::emit('OC_User', 'post_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]); |
575 | 575 | |
@@ -577,14 +577,14 @@ discard block |
||
577 | 577 | $dispatcher = $this->get(IEventDispatcher::class); |
578 | 578 | $dispatcher->dispatchTyped(new PasswordUpdatedEvent($user, $password, $recoveryPassword)); |
579 | 579 | }); |
580 | - $userSession->listen('\OC\User', 'preLogin', function ($uid, $password) { |
|
580 | + $userSession->listen('\OC\User', 'preLogin', function($uid, $password) { |
|
581 | 581 | \OC_Hook::emit('OC_User', 'pre_login', ['run' => true, 'uid' => $uid, 'password' => $password]); |
582 | 582 | |
583 | 583 | /** @var IEventDispatcher $dispatcher */ |
584 | 584 | $dispatcher = $this->get(IEventDispatcher::class); |
585 | 585 | $dispatcher->dispatchTyped(new BeforeUserLoggedInEvent($uid, $password)); |
586 | 586 | }); |
587 | - $userSession->listen('\OC\User', 'postLogin', function ($user, $loginName, $password, $isTokenLogin) { |
|
587 | + $userSession->listen('\OC\User', 'postLogin', function($user, $loginName, $password, $isTokenLogin) { |
|
588 | 588 | /** @var \OC\User\User $user */ |
589 | 589 | \OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'loginName' => $loginName, 'password' => $password, 'isTokenLogin' => $isTokenLogin]); |
590 | 590 | |
@@ -592,12 +592,12 @@ discard block |
||
592 | 592 | $dispatcher = $this->get(IEventDispatcher::class); |
593 | 593 | $dispatcher->dispatchTyped(new UserLoggedInEvent($user, $password, $isTokenLogin)); |
594 | 594 | }); |
595 | - $userSession->listen('\OC\User', 'preRememberedLogin', function ($uid) { |
|
595 | + $userSession->listen('\OC\User', 'preRememberedLogin', function($uid) { |
|
596 | 596 | /** @var IEventDispatcher $dispatcher */ |
597 | 597 | $dispatcher = $this->get(IEventDispatcher::class); |
598 | 598 | $dispatcher->dispatchTyped(new BeforeUserLoggedInWithCookieEvent($uid)); |
599 | 599 | }); |
600 | - $userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) { |
|
600 | + $userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) { |
|
601 | 601 | /** @var \OC\User\User $user */ |
602 | 602 | \OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'password' => $password]); |
603 | 603 | |
@@ -605,19 +605,19 @@ discard block |
||
605 | 605 | $dispatcher = $this->get(IEventDispatcher::class); |
606 | 606 | $dispatcher->dispatchTyped(new UserLoggedInWithCookieEvent($user, $password)); |
607 | 607 | }); |
608 | - $userSession->listen('\OC\User', 'logout', function ($user) { |
|
608 | + $userSession->listen('\OC\User', 'logout', function($user) { |
|
609 | 609 | \OC_Hook::emit('OC_User', 'logout', []); |
610 | 610 | |
611 | 611 | /** @var IEventDispatcher $dispatcher */ |
612 | 612 | $dispatcher = $this->get(IEventDispatcher::class); |
613 | 613 | $dispatcher->dispatchTyped(new BeforeUserLoggedOutEvent($user)); |
614 | 614 | }); |
615 | - $userSession->listen('\OC\User', 'postLogout', function ($user) { |
|
615 | + $userSession->listen('\OC\User', 'postLogout', function($user) { |
|
616 | 616 | /** @var IEventDispatcher $dispatcher */ |
617 | 617 | $dispatcher = $this->get(IEventDispatcher::class); |
618 | 618 | $dispatcher->dispatchTyped(new UserLoggedOutEvent($user)); |
619 | 619 | }); |
620 | - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) { |
|
620 | + $userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) { |
|
621 | 621 | /** @var \OC\User\User $user */ |
622 | 622 | \OC_Hook::emit('OC_User', 'changeUser', ['run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue]); |
623 | 623 | |
@@ -641,7 +641,7 @@ discard block |
||
641 | 641 | $this->registerDeprecatedAlias('AllConfig', \OC\AllConfig::class); |
642 | 642 | $this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class); |
643 | 643 | |
644 | - $this->registerService(\OC\SystemConfig::class, function ($c) use ($config) { |
|
644 | + $this->registerService(\OC\SystemConfig::class, function($c) use ($config) { |
|
645 | 645 | return new \OC\SystemConfig($config); |
646 | 646 | }); |
647 | 647 | /** @deprecated 19.0.0 */ |
@@ -651,7 +651,7 @@ discard block |
||
651 | 651 | $this->registerDeprecatedAlias('AppConfig', \OC\AppConfig::class); |
652 | 652 | $this->registerAlias(IAppConfig::class, \OC\AppConfig::class); |
653 | 653 | |
654 | - $this->registerService(IFactory::class, function (Server $c) { |
|
654 | + $this->registerService(IFactory::class, function(Server $c) { |
|
655 | 655 | return new \OC\L10N\Factory( |
656 | 656 | $c->get(\OCP\IConfig::class), |
657 | 657 | $c->getRequest(), |
@@ -671,13 +671,13 @@ discard block |
||
671 | 671 | /** @deprecated 19.0.0 */ |
672 | 672 | $this->registerDeprecatedAlias('CategoryFetcher', CategoryFetcher::class); |
673 | 673 | |
674 | - $this->registerService(ICache::class, function ($c) { |
|
674 | + $this->registerService(ICache::class, function($c) { |
|
675 | 675 | return new Cache\File(); |
676 | 676 | }); |
677 | 677 | /** @deprecated 19.0.0 */ |
678 | 678 | $this->registerDeprecatedAlias('UserCache', ICache::class); |
679 | 679 | |
680 | - $this->registerService(Factory::class, function (Server $c) { |
|
680 | + $this->registerService(Factory::class, function(Server $c) { |
|
681 | 681 | $arrayCacheFactory = new \OC\Memcache\Factory('', $c->get(ILogger::class), |
682 | 682 | ArrayCache::class, |
683 | 683 | ArrayCache::class, |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | $version = implode(',', $v); |
693 | 693 | $instanceId = \OC_Util::getInstanceId(); |
694 | 694 | $path = \OC::$SERVERROOT; |
695 | - $prefix = md5($instanceId . '-' . $version . '-' . $path); |
|
695 | + $prefix = md5($instanceId.'-'.$version.'-'.$path); |
|
696 | 696 | return new \OC\Memcache\Factory($prefix, $c->get(ILogger::class), |
697 | 697 | $config->getSystemValue('memcache.local', null), |
698 | 698 | $config->getSystemValue('memcache.distributed', null), |
@@ -705,12 +705,12 @@ discard block |
||
705 | 705 | $this->registerDeprecatedAlias('MemCacheFactory', Factory::class); |
706 | 706 | $this->registerAlias(ICacheFactory::class, Factory::class); |
707 | 707 | |
708 | - $this->registerService('RedisFactory', function (Server $c) { |
|
708 | + $this->registerService('RedisFactory', function(Server $c) { |
|
709 | 709 | $systemConfig = $c->get(SystemConfig::class); |
710 | 710 | return new RedisFactory($systemConfig); |
711 | 711 | }); |
712 | 712 | |
713 | - $this->registerService(\OCP\Activity\IManager::class, function (Server $c) { |
|
713 | + $this->registerService(\OCP\Activity\IManager::class, function(Server $c) { |
|
714 | 714 | $l10n = $this->get(IFactory::class)->get('lib'); |
715 | 715 | return new \OC\Activity\Manager( |
716 | 716 | $c->getRequest(), |
@@ -723,14 +723,14 @@ discard block |
||
723 | 723 | /** @deprecated 19.0.0 */ |
724 | 724 | $this->registerDeprecatedAlias('ActivityManager', \OCP\Activity\IManager::class); |
725 | 725 | |
726 | - $this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) { |
|
726 | + $this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) { |
|
727 | 727 | return new \OC\Activity\EventMerger( |
728 | 728 | $c->getL10N('lib') |
729 | 729 | ); |
730 | 730 | }); |
731 | 731 | $this->registerAlias(IValidator::class, Validator::class); |
732 | 732 | |
733 | - $this->registerService(AvatarManager::class, function (Server $c) { |
|
733 | + $this->registerService(AvatarManager::class, function(Server $c) { |
|
734 | 734 | return new AvatarManager( |
735 | 735 | $c->get(\OC\User\Manager::class), |
736 | 736 | $c->getAppDataDir('avatar'), |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | $this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class); |
747 | 747 | $this->registerAlias(\OCP\Support\Subscription\IRegistry::class, \OC\Support\Subscription\Registry::class); |
748 | 748 | |
749 | - $this->registerService(\OC\Log::class, function (Server $c) { |
|
749 | + $this->registerService(\OC\Log::class, function(Server $c) { |
|
750 | 750 | $logType = $c->get(AllConfig::class)->getSystemValue('log_type', 'file'); |
751 | 751 | $factory = new LogFactory($c, $this->get(SystemConfig::class)); |
752 | 752 | $logger = $factory->get($logType); |
@@ -760,7 +760,7 @@ discard block |
||
760 | 760 | // PSR-3 logger |
761 | 761 | $this->registerAlias(LoggerInterface::class, PsrLoggerAdapter::class); |
762 | 762 | |
763 | - $this->registerService(ILogFactory::class, function (Server $c) { |
|
763 | + $this->registerService(ILogFactory::class, function(Server $c) { |
|
764 | 764 | return new LogFactory($c, $this->get(SystemConfig::class)); |
765 | 765 | }); |
766 | 766 | |
@@ -768,7 +768,7 @@ discard block |
||
768 | 768 | /** @deprecated 19.0.0 */ |
769 | 769 | $this->registerDeprecatedAlias('JobList', IJobList::class); |
770 | 770 | |
771 | - $this->registerService(IRouter::class, function (Server $c) { |
|
771 | + $this->registerService(IRouter::class, function(Server $c) { |
|
772 | 772 | $cacheFactory = $c->get(ICacheFactory::class); |
773 | 773 | $logger = $c->get(ILogger::class); |
774 | 774 | if ($cacheFactory->isLocalCacheAvailable()) { |
@@ -785,7 +785,7 @@ discard block |
||
785 | 785 | /** @deprecated 19.0.0 */ |
786 | 786 | $this->registerDeprecatedAlias('Search', ISearch::class); |
787 | 787 | |
788 | - $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) { |
|
788 | + $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) { |
|
789 | 789 | return new \OC\Security\RateLimiting\Backend\MemoryCache( |
790 | 790 | $this->get(ICacheFactory::class), |
791 | 791 | new \OC\AppFramework\Utility\TimeFactory() |
@@ -808,7 +808,7 @@ discard block |
||
808 | 808 | /** @deprecated 19.0.0 */ |
809 | 809 | $this->registerDeprecatedAlias('CredentialsManager', ICredentialsManager::class); |
810 | 810 | |
811 | - $this->registerService(IDBConnection::class, function (Server $c) { |
|
811 | + $this->registerService(IDBConnection::class, function(Server $c) { |
|
812 | 812 | $systemConfig = $c->get(SystemConfig::class); |
813 | 813 | $factory = new \OC\DB\ConnectionFactory($systemConfig); |
814 | 814 | $type = $systemConfig->getValue('dbtype', 'sqlite'); |
@@ -824,7 +824,7 @@ discard block |
||
824 | 824 | $this->registerDeprecatedAlias('DatabaseConnection', IDBConnection::class); |
825 | 825 | |
826 | 826 | |
827 | - $this->registerService(IClientService::class, function (ContainerInterface $c) { |
|
827 | + $this->registerService(IClientService::class, function(ContainerInterface $c) { |
|
828 | 828 | $user = \OC_User::getUser(); |
829 | 829 | $uid = $user ? $user : null; |
830 | 830 | return new ClientService( |
@@ -841,7 +841,7 @@ discard block |
||
841 | 841 | }); |
842 | 842 | /** @deprecated 19.0.0 */ |
843 | 843 | $this->registerDeprecatedAlias('HttpClientService', IClientService::class); |
844 | - $this->registerService(IEventLogger::class, function (ContainerInterface $c) { |
|
844 | + $this->registerService(IEventLogger::class, function(ContainerInterface $c) { |
|
845 | 845 | $eventLogger = new EventLogger(); |
846 | 846 | if ($c->get(SystemConfig::class)->getValue('debug', false)) { |
847 | 847 | // In debug mode, module is being activated by default |
@@ -852,7 +852,7 @@ discard block |
||
852 | 852 | /** @deprecated 19.0.0 */ |
853 | 853 | $this->registerDeprecatedAlias('EventLogger', IEventLogger::class); |
854 | 854 | |
855 | - $this->registerService(IQueryLogger::class, function (ContainerInterface $c) { |
|
855 | + $this->registerService(IQueryLogger::class, function(ContainerInterface $c) { |
|
856 | 856 | $queryLogger = new QueryLogger(); |
857 | 857 | if ($c->get(SystemConfig::class)->getValue('debug', false)) { |
858 | 858 | // In debug mode, module is being activated by default |
@@ -867,7 +867,7 @@ discard block |
||
867 | 867 | $this->registerDeprecatedAlias('TempManager', TempManager::class); |
868 | 868 | $this->registerAlias(ITempManager::class, TempManager::class); |
869 | 869 | |
870 | - $this->registerService(AppManager::class, function (ContainerInterface $c) { |
|
870 | + $this->registerService(AppManager::class, function(ContainerInterface $c) { |
|
871 | 871 | // TODO: use auto-wiring |
872 | 872 | return new \OC\App\AppManager( |
873 | 873 | $c->get(IUserSession::class), |
@@ -887,7 +887,7 @@ discard block |
||
887 | 887 | /** @deprecated 19.0.0 */ |
888 | 888 | $this->registerDeprecatedAlias('DateTimeZone', IDateTimeZone::class); |
889 | 889 | |
890 | - $this->registerService(IDateTimeFormatter::class, function (Server $c) { |
|
890 | + $this->registerService(IDateTimeFormatter::class, function(Server $c) { |
|
891 | 891 | $language = $c->get(\OCP\IConfig::class)->getUserValue($c->get(ISession::class)->get('user_id'), 'core', 'lang', null); |
892 | 892 | |
893 | 893 | return new DateTimeFormatter( |
@@ -898,7 +898,7 @@ discard block |
||
898 | 898 | /** @deprecated 19.0.0 */ |
899 | 899 | $this->registerDeprecatedAlias('DateTimeFormatter', IDateTimeFormatter::class); |
900 | 900 | |
901 | - $this->registerService(IUserMountCache::class, function (ContainerInterface $c) { |
|
901 | + $this->registerService(IUserMountCache::class, function(ContainerInterface $c) { |
|
902 | 902 | $mountCache = new UserMountCache( |
903 | 903 | $c->get(IDBConnection::class), |
904 | 904 | $c->get(IUserManager::class), |
@@ -911,7 +911,7 @@ discard block |
||
911 | 911 | /** @deprecated 19.0.0 */ |
912 | 912 | $this->registerDeprecatedAlias('UserMountCache', IUserMountCache::class); |
913 | 913 | |
914 | - $this->registerService(IMountProviderCollection::class, function (ContainerInterface $c) { |
|
914 | + $this->registerService(IMountProviderCollection::class, function(ContainerInterface $c) { |
|
915 | 915 | $loader = \OC\Files\Filesystem::getLoader(); |
916 | 916 | $mountCache = $c->get(IUserMountCache::class); |
917 | 917 | $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
@@ -932,7 +932,7 @@ discard block |
||
932 | 932 | |
933 | 933 | /** @deprecated 20.0.0 */ |
934 | 934 | $this->registerDeprecatedAlias('IniWrapper', IniGetWrapper::class); |
935 | - $this->registerService(IBus::class, function (ContainerInterface $c) { |
|
935 | + $this->registerService(IBus::class, function(ContainerInterface $c) { |
|
936 | 936 | $busClass = $c->get(\OCP\IConfig::class)->getSystemValue('commandbus'); |
937 | 937 | if ($busClass) { |
938 | 938 | [$app, $class] = explode('::', $busClass, 2); |
@@ -952,7 +952,7 @@ discard block |
||
952 | 952 | $this->registerDeprecatedAlias('TrustedDomainHelper', TrustedDomainHelper::class); |
953 | 953 | /** @deprecated 19.0.0 */ |
954 | 954 | $this->registerDeprecatedAlias('Throttler', Throttler::class); |
955 | - $this->registerService('IntegrityCodeChecker', function (ContainerInterface $c) { |
|
955 | + $this->registerService('IntegrityCodeChecker', function(ContainerInterface $c) { |
|
956 | 956 | // IConfig and IAppManager requires a working database. This code |
957 | 957 | // might however be called when ownCloud is not yet setup. |
958 | 958 | if (\OC::$server->get(SystemConfig::class)->getValue('installed', false)) { |
@@ -974,7 +974,7 @@ discard block |
||
974 | 974 | $c->get(IMimeTypeDetector::class) |
975 | 975 | ); |
976 | 976 | }); |
977 | - $this->registerService(\OCP\IRequest::class, function (ContainerInterface $c) { |
|
977 | + $this->registerService(\OCP\IRequest::class, function(ContainerInterface $c) { |
|
978 | 978 | if (isset($this['urlParams'])) { |
979 | 979 | $urlParams = $this['urlParams']; |
980 | 980 | } else { |
@@ -1011,7 +1011,7 @@ discard block |
||
1011 | 1011 | /** @deprecated 19.0.0 */ |
1012 | 1012 | $this->registerDeprecatedAlias('Request', \OCP\IRequest::class); |
1013 | 1013 | |
1014 | - $this->registerService(IMailer::class, function (Server $c) { |
|
1014 | + $this->registerService(IMailer::class, function(Server $c) { |
|
1015 | 1015 | return new Mailer( |
1016 | 1016 | $c->get(\OCP\IConfig::class), |
1017 | 1017 | $c->get(ILogger::class), |
@@ -1025,7 +1025,7 @@ discard block |
||
1025 | 1025 | /** @deprecated 19.0.0 */ |
1026 | 1026 | $this->registerDeprecatedAlias('Mailer', IMailer::class); |
1027 | 1027 | |
1028 | - $this->registerService('LDAPProvider', function (ContainerInterface $c) { |
|
1028 | + $this->registerService('LDAPProvider', function(ContainerInterface $c) { |
|
1029 | 1029 | $config = $c->get(\OCP\IConfig::class); |
1030 | 1030 | $factoryClass = $config->getSystemValue('ldapProviderFactory', null); |
1031 | 1031 | if (is_null($factoryClass)) { |
@@ -1035,7 +1035,7 @@ discard block |
||
1035 | 1035 | $factory = new $factoryClass($this); |
1036 | 1036 | return $factory->getLDAPProvider(); |
1037 | 1037 | }); |
1038 | - $this->registerService(ILockingProvider::class, function (ContainerInterface $c) { |
|
1038 | + $this->registerService(ILockingProvider::class, function(ContainerInterface $c) { |
|
1039 | 1039 | $ini = $c->get(IniGetWrapper::class); |
1040 | 1040 | $config = $c->get(\OCP\IConfig::class); |
1041 | 1041 | $ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time'))); |
@@ -1063,12 +1063,12 @@ discard block |
||
1063 | 1063 | /** @deprecated 19.0.0 */ |
1064 | 1064 | $this->registerDeprecatedAlias('MountManager', IMountManager::class); |
1065 | 1065 | |
1066 | - $this->registerService(IMimeTypeDetector::class, function (ContainerInterface $c) { |
|
1066 | + $this->registerService(IMimeTypeDetector::class, function(ContainerInterface $c) { |
|
1067 | 1067 | return new \OC\Files\Type\Detection( |
1068 | 1068 | $c->get(IURLGenerator::class), |
1069 | 1069 | $c->get(ILogger::class), |
1070 | 1070 | \OC::$configDir, |
1071 | - \OC::$SERVERROOT . '/resources/config/' |
|
1071 | + \OC::$SERVERROOT.'/resources/config/' |
|
1072 | 1072 | ); |
1073 | 1073 | }); |
1074 | 1074 | /** @deprecated 19.0.0 */ |
@@ -1077,19 +1077,19 @@ discard block |
||
1077 | 1077 | $this->registerAlias(IMimeTypeLoader::class, Loader::class); |
1078 | 1078 | /** @deprecated 19.0.0 */ |
1079 | 1079 | $this->registerDeprecatedAlias('MimeTypeLoader', IMimeTypeLoader::class); |
1080 | - $this->registerService(BundleFetcher::class, function () { |
|
1080 | + $this->registerService(BundleFetcher::class, function() { |
|
1081 | 1081 | return new BundleFetcher($this->getL10N('lib')); |
1082 | 1082 | }); |
1083 | 1083 | $this->registerAlias(\OCP\Notification\IManager::class, Manager::class); |
1084 | 1084 | /** @deprecated 19.0.0 */ |
1085 | 1085 | $this->registerDeprecatedAlias('NotificationManager', \OCP\Notification\IManager::class); |
1086 | 1086 | |
1087 | - $this->registerService(CapabilitiesManager::class, function (ContainerInterface $c) { |
|
1087 | + $this->registerService(CapabilitiesManager::class, function(ContainerInterface $c) { |
|
1088 | 1088 | $manager = new CapabilitiesManager($c->get(ILogger::class)); |
1089 | - $manager->registerCapability(function () use ($c) { |
|
1089 | + $manager->registerCapability(function() use ($c) { |
|
1090 | 1090 | return new \OC\OCS\CoreCapabilities($c->get(\OCP\IConfig::class)); |
1091 | 1091 | }); |
1092 | - $manager->registerCapability(function () use ($c) { |
|
1092 | + $manager->registerCapability(function() use ($c) { |
|
1093 | 1093 | return $c->get(\OC\Security\Bruteforce\Capabilities::class); |
1094 | 1094 | }); |
1095 | 1095 | return $manager; |
@@ -1097,14 +1097,14 @@ discard block |
||
1097 | 1097 | /** @deprecated 19.0.0 */ |
1098 | 1098 | $this->registerDeprecatedAlias('CapabilitiesManager', CapabilitiesManager::class); |
1099 | 1099 | |
1100 | - $this->registerService(ICommentsManager::class, function (Server $c) { |
|
1100 | + $this->registerService(ICommentsManager::class, function(Server $c) { |
|
1101 | 1101 | $config = $c->get(\OCP\IConfig::class); |
1102 | 1102 | $factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class); |
1103 | 1103 | /** @var \OCP\Comments\ICommentsManagerFactory $factory */ |
1104 | 1104 | $factory = new $factoryClass($this); |
1105 | 1105 | $manager = $factory->getManager(); |
1106 | 1106 | |
1107 | - $manager->registerDisplayNameResolver('user', function ($id) use ($c) { |
|
1107 | + $manager->registerDisplayNameResolver('user', function($id) use ($c) { |
|
1108 | 1108 | $manager = $c->get(IUserManager::class); |
1109 | 1109 | $user = $manager->get($id); |
1110 | 1110 | if (is_null($user)) { |
@@ -1122,7 +1122,7 @@ discard block |
||
1122 | 1122 | $this->registerDeprecatedAlias('CommentsManager', ICommentsManager::class); |
1123 | 1123 | |
1124 | 1124 | $this->registerAlias(\OC_Defaults::class, 'ThemingDefaults'); |
1125 | - $this->registerService('ThemingDefaults', function (Server $c) { |
|
1125 | + $this->registerService('ThemingDefaults', function(Server $c) { |
|
1126 | 1126 | /* |
1127 | 1127 | * Dark magic for autoloader. |
1128 | 1128 | * If we do a class_exists it will try to load the class which will |
@@ -1157,7 +1157,7 @@ discard block |
||
1157 | 1157 | } |
1158 | 1158 | return new \OC_Defaults(); |
1159 | 1159 | }); |
1160 | - $this->registerService(JSCombiner::class, function (Server $c) { |
|
1160 | + $this->registerService(JSCombiner::class, function(Server $c) { |
|
1161 | 1161 | return new JSCombiner( |
1162 | 1162 | $c->getAppDataDir('js'), |
1163 | 1163 | $c->get(IURLGenerator::class), |
@@ -1171,7 +1171,7 @@ discard block |
||
1171 | 1171 | $this->registerDeprecatedAlias('EventDispatcher', \OC\EventDispatcher\SymfonyAdapter::class); |
1172 | 1172 | $this->registerAlias(EventDispatcherInterface::class, \OC\EventDispatcher\SymfonyAdapter::class); |
1173 | 1173 | |
1174 | - $this->registerService('CryptoWrapper', function (ContainerInterface $c) { |
|
1174 | + $this->registerService('CryptoWrapper', function(ContainerInterface $c) { |
|
1175 | 1175 | // FIXME: Instantiiated here due to cyclic dependency |
1176 | 1176 | $request = new Request( |
1177 | 1177 | [ |
@@ -1198,14 +1198,14 @@ discard block |
||
1198 | 1198 | }); |
1199 | 1199 | /** @deprecated 19.0.0 */ |
1200 | 1200 | $this->registerDeprecatedAlias('CsrfTokenManager', CsrfTokenManager::class); |
1201 | - $this->registerService(SessionStorage::class, function (ContainerInterface $c) { |
|
1201 | + $this->registerService(SessionStorage::class, function(ContainerInterface $c) { |
|
1202 | 1202 | return new SessionStorage($c->get(ISession::class)); |
1203 | 1203 | }); |
1204 | 1204 | $this->registerAlias(\OCP\Security\IContentSecurityPolicyManager::class, ContentSecurityPolicyManager::class); |
1205 | 1205 | /** @deprecated 19.0.0 */ |
1206 | 1206 | $this->registerDeprecatedAlias('ContentSecurityPolicyManager', ContentSecurityPolicyManager::class); |
1207 | 1207 | |
1208 | - $this->registerService(\OCP\Share\IManager::class, function (IServerContainer $c) { |
|
1208 | + $this->registerService(\OCP\Share\IManager::class, function(IServerContainer $c) { |
|
1209 | 1209 | $config = $c->get(\OCP\IConfig::class); |
1210 | 1210 | $factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class); |
1211 | 1211 | /** @var \OCP\Share\IProviderFactory $factory */ |
@@ -1235,7 +1235,7 @@ discard block |
||
1235 | 1235 | /** @deprecated 19.0.0 */ |
1236 | 1236 | $this->registerDeprecatedAlias('ShareManager', \OCP\Share\IManager::class); |
1237 | 1237 | |
1238 | - $this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function (Server $c) { |
|
1238 | + $this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function(Server $c) { |
|
1239 | 1239 | $instance = new Collaboration\Collaborators\Search($c); |
1240 | 1240 | |
1241 | 1241 | // register default plugins |
@@ -1258,33 +1258,33 @@ discard block |
||
1258 | 1258 | |
1259 | 1259 | $this->registerDeprecatedAlias('SettingsManager', \OC\Settings\Manager::class); |
1260 | 1260 | $this->registerAlias(\OCP\Settings\IManager::class, \OC\Settings\Manager::class); |
1261 | - $this->registerService(\OC\Files\AppData\Factory::class, function (ContainerInterface $c) { |
|
1261 | + $this->registerService(\OC\Files\AppData\Factory::class, function(ContainerInterface $c) { |
|
1262 | 1262 | return new \OC\Files\AppData\Factory( |
1263 | 1263 | $c->get(IRootFolder::class), |
1264 | 1264 | $c->get(SystemConfig::class) |
1265 | 1265 | ); |
1266 | 1266 | }); |
1267 | 1267 | |
1268 | - $this->registerService('LockdownManager', function (ContainerInterface $c) { |
|
1269 | - return new LockdownManager(function () use ($c) { |
|
1268 | + $this->registerService('LockdownManager', function(ContainerInterface $c) { |
|
1269 | + return new LockdownManager(function() use ($c) { |
|
1270 | 1270 | return $c->get(ISession::class); |
1271 | 1271 | }); |
1272 | 1272 | }); |
1273 | 1273 | |
1274 | - $this->registerService(\OCP\OCS\IDiscoveryService::class, function (ContainerInterface $c) { |
|
1274 | + $this->registerService(\OCP\OCS\IDiscoveryService::class, function(ContainerInterface $c) { |
|
1275 | 1275 | return new DiscoveryService( |
1276 | 1276 | $c->get(ICacheFactory::class), |
1277 | 1277 | $c->get(IClientService::class) |
1278 | 1278 | ); |
1279 | 1279 | }); |
1280 | 1280 | |
1281 | - $this->registerService(ICloudIdManager::class, function (ContainerInterface $c) { |
|
1281 | + $this->registerService(ICloudIdManager::class, function(ContainerInterface $c) { |
|
1282 | 1282 | return new CloudIdManager(); |
1283 | 1283 | }); |
1284 | 1284 | |
1285 | 1285 | $this->registerAlias(\OCP\GlobalScale\IConfig::class, \OC\GlobalScale\Config::class); |
1286 | 1286 | |
1287 | - $this->registerService(ICloudFederationProviderManager::class, function (ContainerInterface $c) { |
|
1287 | + $this->registerService(ICloudFederationProviderManager::class, function(ContainerInterface $c) { |
|
1288 | 1288 | return new CloudFederationProviderManager( |
1289 | 1289 | $c->get(IAppManager::class), |
1290 | 1290 | $c->get(IClientService::class), |
@@ -1293,7 +1293,7 @@ discard block |
||
1293 | 1293 | ); |
1294 | 1294 | }); |
1295 | 1295 | |
1296 | - $this->registerService(ICloudFederationFactory::class, function (Server $c) { |
|
1296 | + $this->registerService(ICloudFederationFactory::class, function(Server $c) { |
|
1297 | 1297 | return new CloudFederationFactory(); |
1298 | 1298 | }); |
1299 | 1299 | |
@@ -1305,7 +1305,7 @@ discard block |
||
1305 | 1305 | /** @deprecated 19.0.0 */ |
1306 | 1306 | $this->registerDeprecatedAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class); |
1307 | 1307 | |
1308 | - $this->registerService(Defaults::class, function (Server $c) { |
|
1308 | + $this->registerService(Defaults::class, function(Server $c) { |
|
1309 | 1309 | return new Defaults( |
1310 | 1310 | $c->getThemingDefaults() |
1311 | 1311 | ); |
@@ -1313,17 +1313,17 @@ discard block |
||
1313 | 1313 | /** @deprecated 19.0.0 */ |
1314 | 1314 | $this->registerDeprecatedAlias('Defaults', \OCP\Defaults::class); |
1315 | 1315 | |
1316 | - $this->registerService(\OCP\ISession::class, function (ContainerInterface $c) { |
|
1316 | + $this->registerService(\OCP\ISession::class, function(ContainerInterface $c) { |
|
1317 | 1317 | return $c->get(\OCP\IUserSession::class)->getSession(); |
1318 | 1318 | }, false); |
1319 | 1319 | |
1320 | - $this->registerService(IShareHelper::class, function (ContainerInterface $c) { |
|
1320 | + $this->registerService(IShareHelper::class, function(ContainerInterface $c) { |
|
1321 | 1321 | return new ShareHelper( |
1322 | 1322 | $c->get(\OCP\Share\IManager::class) |
1323 | 1323 | ); |
1324 | 1324 | }); |
1325 | 1325 | |
1326 | - $this->registerService(Installer::class, function (ContainerInterface $c) { |
|
1326 | + $this->registerService(Installer::class, function(ContainerInterface $c) { |
|
1327 | 1327 | return new Installer( |
1328 | 1328 | $c->get(AppFetcher::class), |
1329 | 1329 | $c->get(IClientService::class), |
@@ -1334,11 +1334,11 @@ discard block |
||
1334 | 1334 | ); |
1335 | 1335 | }); |
1336 | 1336 | |
1337 | - $this->registerService(IApiFactory::class, function (ContainerInterface $c) { |
|
1337 | + $this->registerService(IApiFactory::class, function(ContainerInterface $c) { |
|
1338 | 1338 | return new ApiFactory($c->get(IClientService::class)); |
1339 | 1339 | }); |
1340 | 1340 | |
1341 | - $this->registerService(IInstanceFactory::class, function (ContainerInterface $c) { |
|
1341 | + $this->registerService(IInstanceFactory::class, function(ContainerInterface $c) { |
|
1342 | 1342 | $memcacheFactory = $c->get(ICacheFactory::class); |
1343 | 1343 | return new InstanceFactory($memcacheFactory->createLocal('remoteinstance.'), $c->get(IClientService::class)); |
1344 | 1344 | }); |
@@ -1395,7 +1395,7 @@ discard block |
||
1395 | 1395 | $dispatcher = $this->get(SymfonyAdapter::class); |
1396 | 1396 | |
1397 | 1397 | // Delete avatar on user deletion |
1398 | - $dispatcher->addListener('OCP\IUser::preDelete', function (GenericEvent $e) { |
|
1398 | + $dispatcher->addListener('OCP\IUser::preDelete', function(GenericEvent $e) { |
|
1399 | 1399 | $logger = $this->get(ILogger::class); |
1400 | 1400 | $manager = $this->getAvatarManager(); |
1401 | 1401 | /** @var IUser $user */ |
@@ -1408,11 +1408,11 @@ discard block |
||
1408 | 1408 | // no avatar to remove |
1409 | 1409 | } catch (\Exception $e) { |
1410 | 1410 | // Ignore exceptions |
1411 | - $logger->info('Could not cleanup avatar of ' . $user->getUID()); |
|
1411 | + $logger->info('Could not cleanup avatar of '.$user->getUID()); |
|
1412 | 1412 | } |
1413 | 1413 | }); |
1414 | 1414 | |
1415 | - $dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) { |
|
1415 | + $dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) { |
|
1416 | 1416 | $manager = $this->getAvatarManager(); |
1417 | 1417 | /** @var IUser $user */ |
1418 | 1418 | $user = $e->getSubject(); |
@@ -2319,11 +2319,11 @@ discard block |
||
2319 | 2319 | } |
2320 | 2320 | |
2321 | 2321 | private function registerDeprecatedAlias(string $alias, string $target) { |
2322 | - $this->registerService($alias, function (ContainerInterface $container) use ($target, $alias) { |
|
2322 | + $this->registerService($alias, function(ContainerInterface $container) use ($target, $alias) { |
|
2323 | 2323 | try { |
2324 | 2324 | /** @var ILogger $logger */ |
2325 | 2325 | $logger = $container->get(ILogger::class); |
2326 | - $logger->debug('The requested alias "' . $alias . '" is depreacted. Please request "' . $target . '" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']); |
|
2326 | + $logger->debug('The requested alias "'.$alias.'" is depreacted. Please request "'.$target.'" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']); |
|
2327 | 2327 | } catch (ContainerExceptionInterface $e) { |
2328 | 2328 | // Could not get logger. Continue |
2329 | 2329 | } |