@@ -259,10 +259,10 @@ discard block |
||
259 | 259 | $this->registerParameter('isCLI', \OC::$CLI); |
260 | 260 | $this->registerParameter('serverRoot', \OC::$SERVERROOT); |
261 | 261 | |
262 | - $this->registerService(ContainerInterface::class, function (ContainerInterface $c) { |
|
262 | + $this->registerService(ContainerInterface::class, function(ContainerInterface $c) { |
|
263 | 263 | return $c; |
264 | 264 | }); |
265 | - $this->registerService(\OCP\IServerContainer::class, function (ContainerInterface $c) { |
|
265 | + $this->registerService(\OCP\IServerContainer::class, function(ContainerInterface $c) { |
|
266 | 266 | return $c; |
267 | 267 | }); |
268 | 268 | |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | $this->registerAlias(IActionFactory::class, ActionFactory::class); |
288 | 288 | |
289 | 289 | |
290 | - $this->registerService(IPreview::class, function (Server $c) { |
|
290 | + $this->registerService(IPreview::class, function(Server $c) { |
|
291 | 291 | return new PreviewManager( |
292 | 292 | $c->getConfig(), |
293 | 293 | $c->getRootFolder(), |
@@ -300,13 +300,13 @@ discard block |
||
300 | 300 | /** @deprecated 19.0.0 */ |
301 | 301 | $this->registerDeprecatedAlias('PreviewManager', IPreview::class); |
302 | 302 | |
303 | - $this->registerService(\OC\Preview\Watcher::class, function (Server $c) { |
|
303 | + $this->registerService(\OC\Preview\Watcher::class, function(Server $c) { |
|
304 | 304 | return new \OC\Preview\Watcher( |
305 | 305 | new \OC\Preview\Storage\Root($c->getRootFolder(), $c->getSystemConfig()) |
306 | 306 | ); |
307 | 307 | }); |
308 | 308 | |
309 | - $this->registerService(\OCP\Encryption\IManager::class, function (Server $c) { |
|
309 | + $this->registerService(\OCP\Encryption\IManager::class, function(Server $c) { |
|
310 | 310 | $view = new View(); |
311 | 311 | $util = new Encryption\Util( |
312 | 312 | $view, |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | /** @deprecated 19.0.0 */ |
327 | 327 | $this->registerDeprecatedAlias('EncryptionManager', \OCP\Encryption\IManager::class); |
328 | 328 | |
329 | - $this->registerService('EncryptionFileHelper', function (Server $c) { |
|
329 | + $this->registerService('EncryptionFileHelper', function(Server $c) { |
|
330 | 330 | $util = new Encryption\Util( |
331 | 331 | new View(), |
332 | 332 | $c->getUserManager(), |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | ); |
341 | 341 | }); |
342 | 342 | |
343 | - $this->registerService('EncryptionKeyStorage', function (Server $c) { |
|
343 | + $this->registerService('EncryptionKeyStorage', function(Server $c) { |
|
344 | 344 | $view = new View(); |
345 | 345 | $util = new Encryption\Util( |
346 | 346 | $view, |
@@ -358,21 +358,21 @@ discard block |
||
358 | 358 | /** @deprecated 19.0.0 */ |
359 | 359 | $this->registerDeprecatedAlias('TagManager', \OCP\ITagManager::class); |
360 | 360 | |
361 | - $this->registerService('SystemTagManagerFactory', function (Server $c) { |
|
361 | + $this->registerService('SystemTagManagerFactory', function(Server $c) { |
|
362 | 362 | $config = $c->getConfig(); |
363 | 363 | $factoryClass = $config->getSystemValue('systemtags.managerFactory', SystemTagManagerFactory::class); |
364 | 364 | return new $factoryClass($this); |
365 | 365 | }); |
366 | - $this->registerService(ISystemTagManager::class, function (Server $c) { |
|
366 | + $this->registerService(ISystemTagManager::class, function(Server $c) { |
|
367 | 367 | return $c->query('SystemTagManagerFactory')->getManager(); |
368 | 368 | }); |
369 | 369 | /** @deprecated 19.0.0 */ |
370 | 370 | $this->registerDeprecatedAlias('SystemTagManager', ISystemTagManager::class); |
371 | 371 | |
372 | - $this->registerService(ISystemTagObjectMapper::class, function (Server $c) { |
|
372 | + $this->registerService(ISystemTagObjectMapper::class, function(Server $c) { |
|
373 | 373 | return $c->query('SystemTagManagerFactory')->getObjectMapper(); |
374 | 374 | }); |
375 | - $this->registerService('RootFolder', function (Server $c) { |
|
375 | + $this->registerService('RootFolder', function(Server $c) { |
|
376 | 376 | $manager = \OC\Files\Filesystem::getMountManager(null); |
377 | 377 | $view = new View(); |
378 | 378 | $root = new Root( |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | |
390 | 390 | return $root; |
391 | 391 | }); |
392 | - $this->registerService(HookConnector::class, function (Server $c) { |
|
392 | + $this->registerService(HookConnector::class, function(Server $c) { |
|
393 | 393 | return new HookConnector( |
394 | 394 | $c->query(IRootFolder::class), |
395 | 395 | new View(), |
@@ -401,8 +401,8 @@ discard block |
||
401 | 401 | /** @deprecated 19.0.0 */ |
402 | 402 | $this->registerDeprecatedAlias('SystemTagObjectMapper', ISystemTagObjectMapper::class); |
403 | 403 | |
404 | - $this->registerService(IRootFolder::class, function (Server $c) { |
|
405 | - return new LazyRoot(function () use ($c) { |
|
404 | + $this->registerService(IRootFolder::class, function(Server $c) { |
|
405 | + return new LazyRoot(function() use ($c) { |
|
406 | 406 | return $c->query('RootFolder'); |
407 | 407 | }); |
408 | 408 | }); |
@@ -413,44 +413,44 @@ discard block |
||
413 | 413 | $this->registerDeprecatedAlias('UserManager', \OC\User\Manager::class); |
414 | 414 | $this->registerAlias(\OCP\IUserManager::class, \OC\User\Manager::class); |
415 | 415 | |
416 | - $this->registerService(\OCP\IGroupManager::class, function (Server $c) { |
|
416 | + $this->registerService(\OCP\IGroupManager::class, function(Server $c) { |
|
417 | 417 | $groupManager = new \OC\Group\Manager($this->getUserManager(), $c->getEventDispatcher(), $this->getLogger()); |
418 | - $groupManager->listen('\OC\Group', 'preCreate', function ($gid) { |
|
418 | + $groupManager->listen('\OC\Group', 'preCreate', function($gid) { |
|
419 | 419 | \OC_Hook::emit('OC_Group', 'pre_createGroup', ['run' => true, 'gid' => $gid]); |
420 | 420 | |
421 | 421 | /** @var IEventDispatcher $dispatcher */ |
422 | 422 | $dispatcher = $this->query(IEventDispatcher::class); |
423 | 423 | $dispatcher->dispatchTyped(new BeforeGroupCreatedEvent($gid)); |
424 | 424 | }); |
425 | - $groupManager->listen('\OC\Group', 'postCreate', function (\OC\Group\Group $group) { |
|
425 | + $groupManager->listen('\OC\Group', 'postCreate', function(\OC\Group\Group $group) { |
|
426 | 426 | \OC_Hook::emit('OC_User', 'post_createGroup', ['gid' => $group->getGID()]); |
427 | 427 | |
428 | 428 | /** @var IEventDispatcher $dispatcher */ |
429 | 429 | $dispatcher = $this->query(IEventDispatcher::class); |
430 | 430 | $dispatcher->dispatchTyped(new GroupCreatedEvent($group)); |
431 | 431 | }); |
432 | - $groupManager->listen('\OC\Group', 'preDelete', function (\OC\Group\Group $group) { |
|
432 | + $groupManager->listen('\OC\Group', 'preDelete', function(\OC\Group\Group $group) { |
|
433 | 433 | \OC_Hook::emit('OC_Group', 'pre_deleteGroup', ['run' => true, 'gid' => $group->getGID()]); |
434 | 434 | |
435 | 435 | /** @var IEventDispatcher $dispatcher */ |
436 | 436 | $dispatcher = $this->query(IEventDispatcher::class); |
437 | 437 | $dispatcher->dispatchTyped(new BeforeGroupDeletedEvent($group)); |
438 | 438 | }); |
439 | - $groupManager->listen('\OC\Group', 'postDelete', function (\OC\Group\Group $group) { |
|
439 | + $groupManager->listen('\OC\Group', 'postDelete', function(\OC\Group\Group $group) { |
|
440 | 440 | \OC_Hook::emit('OC_User', 'post_deleteGroup', ['gid' => $group->getGID()]); |
441 | 441 | |
442 | 442 | /** @var IEventDispatcher $dispatcher */ |
443 | 443 | $dispatcher = $this->query(IEventDispatcher::class); |
444 | 444 | $dispatcher->dispatchTyped(new GroupDeletedEvent($group)); |
445 | 445 | }); |
446 | - $groupManager->listen('\OC\Group', 'preAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
446 | + $groupManager->listen('\OC\Group', 'preAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
447 | 447 | \OC_Hook::emit('OC_Group', 'pre_addToGroup', ['run' => true, 'uid' => $user->getUID(), 'gid' => $group->getGID()]); |
448 | 448 | |
449 | 449 | /** @var IEventDispatcher $dispatcher */ |
450 | 450 | $dispatcher = $this->query(IEventDispatcher::class); |
451 | 451 | $dispatcher->dispatchTyped(new BeforeUserAddedEvent($group, $user)); |
452 | 452 | }); |
453 | - $groupManager->listen('\OC\Group', 'postAddUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
453 | + $groupManager->listen('\OC\Group', 'postAddUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
454 | 454 | \OC_Hook::emit('OC_Group', 'post_addToGroup', ['uid' => $user->getUID(), 'gid' => $group->getGID()]); |
455 | 455 | //Minimal fix to keep it backward compatible TODO: clean up all the GroupManager hooks |
456 | 456 | \OC_Hook::emit('OC_User', 'post_addToGroup', ['uid' => $user->getUID(), 'gid' => $group->getGID()]); |
@@ -459,12 +459,12 @@ discard block |
||
459 | 459 | $dispatcher = $this->query(IEventDispatcher::class); |
460 | 460 | $dispatcher->dispatchTyped(new UserAddedEvent($group, $user)); |
461 | 461 | }); |
462 | - $groupManager->listen('\OC\Group', 'preRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
462 | + $groupManager->listen('\OC\Group', 'preRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
463 | 463 | /** @var IEventDispatcher $dispatcher */ |
464 | 464 | $dispatcher = $this->query(IEventDispatcher::class); |
465 | 465 | $dispatcher->dispatchTyped(new BeforeUserRemovedEvent($group, $user)); |
466 | 466 | }); |
467 | - $groupManager->listen('\OC\Group', 'postRemoveUser', function (\OC\Group\Group $group, \OC\User\User $user) { |
|
467 | + $groupManager->listen('\OC\Group', 'postRemoveUser', function(\OC\Group\Group $group, \OC\User\User $user) { |
|
468 | 468 | /** @var IEventDispatcher $dispatcher */ |
469 | 469 | $dispatcher = $this->query(IEventDispatcher::class); |
470 | 470 | $dispatcher->dispatchTyped(new UserRemovedEvent($group, $user)); |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | /** @deprecated 19.0.0 */ |
475 | 475 | $this->registerDeprecatedAlias('GroupManager', \OCP\IGroupManager::class); |
476 | 476 | |
477 | - $this->registerService(Store::class, function (Server $c) { |
|
477 | + $this->registerService(Store::class, function(Server $c) { |
|
478 | 478 | $session = $c->getSession(); |
479 | 479 | if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
480 | 480 | $tokenProvider = $c->query(IProvider::class); |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | $this->registerAlias(IStore::class, Store::class); |
488 | 488 | $this->registerAlias(IProvider::class, Authentication\Token\Manager::class); |
489 | 489 | |
490 | - $this->registerService(\OC\User\Session::class, function (Server $c) { |
|
490 | + $this->registerService(\OC\User\Session::class, function(Server $c) { |
|
491 | 491 | $manager = $c->getUserManager(); |
492 | 492 | $session = new \OC\Session\Memory(''); |
493 | 493 | $timeFactory = new TimeFactory(); |
@@ -512,14 +512,14 @@ discard block |
||
512 | 512 | $c->getLogger(), |
513 | 513 | $c->query(IEventDispatcher::class) |
514 | 514 | ); |
515 | - $userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) { |
|
515 | + $userSession->listen('\OC\User', 'preCreateUser', function($uid, $password) { |
|
516 | 516 | \OC_Hook::emit('OC_User', 'pre_createUser', ['run' => true, 'uid' => $uid, 'password' => $password]); |
517 | 517 | |
518 | 518 | /** @var IEventDispatcher $dispatcher */ |
519 | 519 | $dispatcher = $this->query(IEventDispatcher::class); |
520 | 520 | $dispatcher->dispatchTyped(new BeforeUserCreatedEvent($uid, $password)); |
521 | 521 | }); |
522 | - $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { |
|
522 | + $userSession->listen('\OC\User', 'postCreateUser', function($user, $password) { |
|
523 | 523 | /** @var \OC\User\User $user */ |
524 | 524 | \OC_Hook::emit('OC_User', 'post_createUser', ['uid' => $user->getUID(), 'password' => $password]); |
525 | 525 | |
@@ -527,7 +527,7 @@ discard block |
||
527 | 527 | $dispatcher = $this->query(IEventDispatcher::class); |
528 | 528 | $dispatcher->dispatchTyped(new UserCreatedEvent($user, $password)); |
529 | 529 | }); |
530 | - $userSession->listen('\OC\User', 'preDelete', function ($user) use ($legacyDispatcher) { |
|
530 | + $userSession->listen('\OC\User', 'preDelete', function($user) use ($legacyDispatcher) { |
|
531 | 531 | /** @var \OC\User\User $user */ |
532 | 532 | \OC_Hook::emit('OC_User', 'pre_deleteUser', ['run' => true, 'uid' => $user->getUID()]); |
533 | 533 | $legacyDispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user)); |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | $dispatcher = $this->query(IEventDispatcher::class); |
537 | 537 | $dispatcher->dispatchTyped(new BeforeUserDeletedEvent($user)); |
538 | 538 | }); |
539 | - $userSession->listen('\OC\User', 'postDelete', function ($user) { |
|
539 | + $userSession->listen('\OC\User', 'postDelete', function($user) { |
|
540 | 540 | /** @var \OC\User\User $user */ |
541 | 541 | \OC_Hook::emit('OC_User', 'post_deleteUser', ['uid' => $user->getUID()]); |
542 | 542 | |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | $dispatcher = $this->query(IEventDispatcher::class); |
545 | 545 | $dispatcher->dispatchTyped(new UserDeletedEvent($user)); |
546 | 546 | }); |
547 | - $userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) { |
|
547 | + $userSession->listen('\OC\User', 'preSetPassword', function($user, $password, $recoveryPassword) { |
|
548 | 548 | /** @var \OC\User\User $user */ |
549 | 549 | \OC_Hook::emit('OC_User', 'pre_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]); |
550 | 550 | |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | $dispatcher = $this->query(IEventDispatcher::class); |
553 | 553 | $dispatcher->dispatchTyped(new BeforePasswordUpdatedEvent($user, $password, $recoveryPassword)); |
554 | 554 | }); |
555 | - $userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) { |
|
555 | + $userSession->listen('\OC\User', 'postSetPassword', function($user, $password, $recoveryPassword) { |
|
556 | 556 | /** @var \OC\User\User $user */ |
557 | 557 | \OC_Hook::emit('OC_User', 'post_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]); |
558 | 558 | |
@@ -560,14 +560,14 @@ discard block |
||
560 | 560 | $dispatcher = $this->query(IEventDispatcher::class); |
561 | 561 | $dispatcher->dispatchTyped(new PasswordUpdatedEvent($user, $password, $recoveryPassword)); |
562 | 562 | }); |
563 | - $userSession->listen('\OC\User', 'preLogin', function ($uid, $password) { |
|
563 | + $userSession->listen('\OC\User', 'preLogin', function($uid, $password) { |
|
564 | 564 | \OC_Hook::emit('OC_User', 'pre_login', ['run' => true, 'uid' => $uid, 'password' => $password]); |
565 | 565 | |
566 | 566 | /** @var IEventDispatcher $dispatcher */ |
567 | 567 | $dispatcher = $this->query(IEventDispatcher::class); |
568 | 568 | $dispatcher->dispatchTyped(new BeforeUserLoggedInEvent($uid, $password)); |
569 | 569 | }); |
570 | - $userSession->listen('\OC\User', 'postLogin', function ($user, $loginName, $password, $isTokenLogin) { |
|
570 | + $userSession->listen('\OC\User', 'postLogin', function($user, $loginName, $password, $isTokenLogin) { |
|
571 | 571 | /** @var \OC\User\User $user */ |
572 | 572 | \OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'loginName' => $loginName, 'password' => $password, 'isTokenLogin' => $isTokenLogin]); |
573 | 573 | |
@@ -575,12 +575,12 @@ discard block |
||
575 | 575 | $dispatcher = $this->query(IEventDispatcher::class); |
576 | 576 | $dispatcher->dispatchTyped(new UserLoggedInEvent($user, $password, $isTokenLogin)); |
577 | 577 | }); |
578 | - $userSession->listen('\OC\User', 'preRememberedLogin', function ($uid) { |
|
578 | + $userSession->listen('\OC\User', 'preRememberedLogin', function($uid) { |
|
579 | 579 | /** @var IEventDispatcher $dispatcher */ |
580 | 580 | $dispatcher = $this->query(IEventDispatcher::class); |
581 | 581 | $dispatcher->dispatchTyped(new BeforeUserLoggedInWithCookieEvent($uid)); |
582 | 582 | }); |
583 | - $userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) { |
|
583 | + $userSession->listen('\OC\User', 'postRememberedLogin', function($user, $password) { |
|
584 | 584 | /** @var \OC\User\User $user */ |
585 | 585 | \OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'password' => $password]); |
586 | 586 | |
@@ -588,19 +588,19 @@ discard block |
||
588 | 588 | $dispatcher = $this->query(IEventDispatcher::class); |
589 | 589 | $dispatcher->dispatchTyped(new UserLoggedInWithCookieEvent($user, $password)); |
590 | 590 | }); |
591 | - $userSession->listen('\OC\User', 'logout', function ($user) { |
|
591 | + $userSession->listen('\OC\User', 'logout', function($user) { |
|
592 | 592 | \OC_Hook::emit('OC_User', 'logout', []); |
593 | 593 | |
594 | 594 | /** @var IEventDispatcher $dispatcher */ |
595 | 595 | $dispatcher = $this->query(IEventDispatcher::class); |
596 | 596 | $dispatcher->dispatchTyped(new BeforeUserLoggedOutEvent($user)); |
597 | 597 | }); |
598 | - $userSession->listen('\OC\User', 'postLogout', function ($user) { |
|
598 | + $userSession->listen('\OC\User', 'postLogout', function($user) { |
|
599 | 599 | /** @var IEventDispatcher $dispatcher */ |
600 | 600 | $dispatcher = $this->query(IEventDispatcher::class); |
601 | 601 | $dispatcher->dispatchTyped(new UserLoggedOutEvent($user)); |
602 | 602 | }); |
603 | - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) { |
|
603 | + $userSession->listen('\OC\User', 'changeUser', function($user, $feature, $value, $oldValue) { |
|
604 | 604 | /** @var \OC\User\User $user */ |
605 | 605 | \OC_Hook::emit('OC_User', 'changeUser', ['run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue]); |
606 | 606 | |
@@ -624,7 +624,7 @@ discard block |
||
624 | 624 | $this->registerDeprecatedAlias('AllConfig', \OC\AllConfig::class); |
625 | 625 | $this->registerAlias(\OCP\IConfig::class, \OC\AllConfig::class); |
626 | 626 | |
627 | - $this->registerService(\OC\SystemConfig::class, function ($c) use ($config) { |
|
627 | + $this->registerService(\OC\SystemConfig::class, function($c) use ($config) { |
|
628 | 628 | return new \OC\SystemConfig($config); |
629 | 629 | }); |
630 | 630 | /** @deprecated 19.0.0 */ |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | $this->registerDeprecatedAlias('AppConfig', \OC\AppConfig::class); |
635 | 635 | $this->registerAlias(IAppConfig::class, \OC\AppConfig::class); |
636 | 636 | |
637 | - $this->registerService(IFactory::class, function (Server $c) { |
|
637 | + $this->registerService(IFactory::class, function(Server $c) { |
|
638 | 638 | return new \OC\L10N\Factory( |
639 | 639 | $c->getConfig(), |
640 | 640 | $c->getRequest(), |
@@ -654,13 +654,13 @@ discard block |
||
654 | 654 | /** @deprecated 19.0.0 */ |
655 | 655 | $this->registerDeprecatedAlias('CategoryFetcher', CategoryFetcher::class); |
656 | 656 | |
657 | - $this->registerService(ICache::class, function ($c) { |
|
657 | + $this->registerService(ICache::class, function($c) { |
|
658 | 658 | return new Cache\File(); |
659 | 659 | }); |
660 | 660 | /** @deprecated 19.0.0 */ |
661 | 661 | $this->registerDeprecatedAlias('UserCache', ICache::class); |
662 | 662 | |
663 | - $this->registerService(Factory::class, function (Server $c) { |
|
663 | + $this->registerService(Factory::class, function(Server $c) { |
|
664 | 664 | $arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(), |
665 | 665 | ArrayCache::class, |
666 | 666 | ArrayCache::class, |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | $version = implode(',', $v); |
675 | 675 | $instanceId = \OC_Util::getInstanceId(); |
676 | 676 | $path = \OC::$SERVERROOT; |
677 | - $prefix = md5($instanceId . '-' . $version . '-' . $path); |
|
677 | + $prefix = md5($instanceId.'-'.$version.'-'.$path); |
|
678 | 678 | return new \OC\Memcache\Factory($prefix, $c->getLogger(), |
679 | 679 | $config->getSystemValue('memcache.local', null), |
680 | 680 | $config->getSystemValue('memcache.distributed', null), |
@@ -687,12 +687,12 @@ discard block |
||
687 | 687 | $this->registerDeprecatedAlias('MemCacheFactory', Factory::class); |
688 | 688 | $this->registerAlias(ICacheFactory::class, Factory::class); |
689 | 689 | |
690 | - $this->registerService('RedisFactory', function (Server $c) { |
|
690 | + $this->registerService('RedisFactory', function(Server $c) { |
|
691 | 691 | $systemConfig = $c->getSystemConfig(); |
692 | 692 | return new RedisFactory($systemConfig); |
693 | 693 | }); |
694 | 694 | |
695 | - $this->registerService(\OCP\Activity\IManager::class, function (Server $c) { |
|
695 | + $this->registerService(\OCP\Activity\IManager::class, function(Server $c) { |
|
696 | 696 | $l10n = $this->get(IFactory::class)->get('activity'); |
697 | 697 | return new \OC\Activity\Manager( |
698 | 698 | $c->getRequest(), |
@@ -705,14 +705,14 @@ discard block |
||
705 | 705 | /** @deprecated 19.0.0 */ |
706 | 706 | $this->registerDeprecatedAlias('ActivityManager', \OCP\Activity\IManager::class); |
707 | 707 | |
708 | - $this->registerService(\OCP\Activity\IEventMerger::class, function (Server $c) { |
|
708 | + $this->registerService(\OCP\Activity\IEventMerger::class, function(Server $c) { |
|
709 | 709 | return new \OC\Activity\EventMerger( |
710 | 710 | $c->getL10N('lib') |
711 | 711 | ); |
712 | 712 | }); |
713 | 713 | $this->registerAlias(IValidator::class, Validator::class); |
714 | 714 | |
715 | - $this->registerService(AvatarManager::class, function (Server $c) { |
|
715 | + $this->registerService(AvatarManager::class, function(Server $c) { |
|
716 | 716 | return new AvatarManager( |
717 | 717 | $c->query(\OC\User\Manager::class), |
718 | 718 | $c->getAppDataDir('avatar'), |
@@ -728,7 +728,7 @@ discard block |
||
728 | 728 | $this->registerAlias(\OCP\Support\CrashReport\IRegistry::class, \OC\Support\CrashReport\Registry::class); |
729 | 729 | $this->registerAlias(\OCP\Support\Subscription\IRegistry::class, \OC\Support\Subscription\Registry::class); |
730 | 730 | |
731 | - $this->registerService(\OC\Log::class, function (Server $c) { |
|
731 | + $this->registerService(\OC\Log::class, function(Server $c) { |
|
732 | 732 | $logType = $c->query(AllConfig::class)->getSystemValue('log_type', 'file'); |
733 | 733 | $factory = new LogFactory($c, $this->getSystemConfig()); |
734 | 734 | $logger = $factory->get($logType); |
@@ -742,7 +742,7 @@ discard block |
||
742 | 742 | // PSR-3 logger |
743 | 743 | $this->registerAlias(LoggerInterface::class, PsrLoggerAdapter::class); |
744 | 744 | |
745 | - $this->registerService(ILogFactory::class, function (Server $c) { |
|
745 | + $this->registerService(ILogFactory::class, function(Server $c) { |
|
746 | 746 | return new LogFactory($c, $this->getSystemConfig()); |
747 | 747 | }); |
748 | 748 | |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | /** @deprecated 19.0.0 */ |
751 | 751 | $this->registerDeprecatedAlias('JobList', IJobList::class); |
752 | 752 | |
753 | - $this->registerService(IRouter::class, function (Server $c) { |
|
753 | + $this->registerService(IRouter::class, function(Server $c) { |
|
754 | 754 | $cacheFactory = $c->getMemCacheFactory(); |
755 | 755 | $logger = $c->getLogger(); |
756 | 756 | if ($cacheFactory->isLocalCacheAvailable()) { |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | /** @deprecated 19.0.0 */ |
768 | 768 | $this->registerDeprecatedAlias('Search', ISearch::class); |
769 | 769 | |
770 | - $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function ($c) { |
|
770 | + $this->registerService(\OC\Security\RateLimiting\Backend\IBackend::class, function($c) { |
|
771 | 771 | return new \OC\Security\RateLimiting\Backend\MemoryCache( |
772 | 772 | $this->getMemCacheFactory(), |
773 | 773 | new \OC\AppFramework\Utility\TimeFactory() |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | /** @deprecated 19.0.0 */ |
791 | 791 | $this->registerDeprecatedAlias('CredentialsManager', ICredentialsManager::class); |
792 | 792 | |
793 | - $this->registerService(IDBConnection::class, function (Server $c) { |
|
793 | + $this->registerService(IDBConnection::class, function(Server $c) { |
|
794 | 794 | $systemConfig = $c->getSystemConfig(); |
795 | 795 | $factory = new \OC\DB\ConnectionFactory($systemConfig); |
796 | 796 | $type = $systemConfig->getValue('dbtype', 'sqlite'); |
@@ -806,7 +806,7 @@ discard block |
||
806 | 806 | $this->registerDeprecatedAlias('DatabaseConnection', IDBConnection::class); |
807 | 807 | |
808 | 808 | |
809 | - $this->registerService(IClientService::class, function (Server $c) { |
|
809 | + $this->registerService(IClientService::class, function(Server $c) { |
|
810 | 810 | $user = \OC_User::getUser(); |
811 | 811 | $uid = $user ? $user : null; |
812 | 812 | return new ClientService( |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | }); |
824 | 824 | /** @deprecated 19.0.0 */ |
825 | 825 | $this->registerDeprecatedAlias('HttpClientService', IClientService::class); |
826 | - $this->registerService(IEventLogger::class, function (Server $c) { |
|
826 | + $this->registerService(IEventLogger::class, function(Server $c) { |
|
827 | 827 | $eventLogger = new EventLogger(); |
828 | 828 | if ($c->getSystemConfig()->getValue('debug', false)) { |
829 | 829 | // In debug mode, module is being activated by default |
@@ -834,7 +834,7 @@ discard block |
||
834 | 834 | /** @deprecated 19.0.0 */ |
835 | 835 | $this->registerDeprecatedAlias('EventLogger', IEventLogger::class); |
836 | 836 | |
837 | - $this->registerService(IQueryLogger::class, function (Server $c) { |
|
837 | + $this->registerService(IQueryLogger::class, function(Server $c) { |
|
838 | 838 | $queryLogger = new QueryLogger(); |
839 | 839 | if ($c->getSystemConfig()->getValue('debug', false)) { |
840 | 840 | // In debug mode, module is being activated by default |
@@ -849,7 +849,7 @@ discard block |
||
849 | 849 | $this->registerDeprecatedAlias('TempManager', TempManager::class); |
850 | 850 | $this->registerAlias(ITempManager::class, TempManager::class); |
851 | 851 | |
852 | - $this->registerService(AppManager::class, function (Server $c) { |
|
852 | + $this->registerService(AppManager::class, function(Server $c) { |
|
853 | 853 | return new \OC\App\AppManager( |
854 | 854 | $c->getUserSession(), |
855 | 855 | $c->getConfig(), |
@@ -868,7 +868,7 @@ discard block |
||
868 | 868 | /** @deprecated 19.0.0 */ |
869 | 869 | $this->registerDeprecatedAlias('DateTimeZone', IDateTimeZone::class); |
870 | 870 | |
871 | - $this->registerService(IDateTimeFormatter::class, function (Server $c) { |
|
871 | + $this->registerService(IDateTimeFormatter::class, function(Server $c) { |
|
872 | 872 | $language = $c->getConfig()->getUserValue($c->getSession()->get('user_id'), 'core', 'lang', null); |
873 | 873 | |
874 | 874 | return new DateTimeFormatter( |
@@ -879,7 +879,7 @@ discard block |
||
879 | 879 | /** @deprecated 19.0.0 */ |
880 | 880 | $this->registerDeprecatedAlias('DateTimeFormatter', IDateTimeFormatter::class); |
881 | 881 | |
882 | - $this->registerService(IUserMountCache::class, function (Server $c) { |
|
882 | + $this->registerService(IUserMountCache::class, function(Server $c) { |
|
883 | 883 | $mountCache = new UserMountCache($c->getDatabaseConnection(), $c->getUserManager(), $c->getLogger()); |
884 | 884 | $listener = new UserMountCacheListener($mountCache); |
885 | 885 | $listener->listen($c->getUserManager()); |
@@ -888,7 +888,7 @@ discard block |
||
888 | 888 | /** @deprecated 19.0.0 */ |
889 | 889 | $this->registerDeprecatedAlias('UserMountCache', IUserMountCache::class); |
890 | 890 | |
891 | - $this->registerService(IMountProviderCollection::class, function (Server $c) { |
|
891 | + $this->registerService(IMountProviderCollection::class, function(Server $c) { |
|
892 | 892 | $loader = \OC\Files\Filesystem::getLoader(); |
893 | 893 | $mountCache = $c->query(IUserMountCache::class); |
894 | 894 | $manager = new \OC\Files\Config\MountProviderCollection($loader, $mountCache); |
@@ -909,7 +909,7 @@ discard block |
||
909 | 909 | |
910 | 910 | /** @deprecated 20.0.0 */ |
911 | 911 | $this->registerDeprecatedAlias('IniWrapper', IniGetWrapper::class); |
912 | - $this->registerService('AsyncCommandBus', function (Server $c) { |
|
912 | + $this->registerService('AsyncCommandBus', function(Server $c) { |
|
913 | 913 | $busClass = $c->getConfig()->getSystemValue('commandbus'); |
914 | 914 | if ($busClass) { |
915 | 915 | [$app, $class] = explode('::', $busClass, 2); |
@@ -929,7 +929,7 @@ discard block |
||
929 | 929 | $this->registerDeprecatedAlias('TrustedDomainHelper', TrustedDomainHelper::class); |
930 | 930 | /** @deprecated 19.0.0 */ |
931 | 931 | $this->registerDeprecatedAlias('Throttler', Throttler::class); |
932 | - $this->registerService('IntegrityCodeChecker', function (Server $c) { |
|
932 | + $this->registerService('IntegrityCodeChecker', function(Server $c) { |
|
933 | 933 | // IConfig and IAppManager requires a working database. This code |
934 | 934 | // might however be called when ownCloud is not yet setup. |
935 | 935 | if (\OC::$server->getSystemConfig()->getValue('installed', false)) { |
@@ -951,7 +951,7 @@ discard block |
||
951 | 951 | $c->getMimeTypeDetector() |
952 | 952 | ); |
953 | 953 | }); |
954 | - $this->registerService(\OCP\IRequest::class, function ($c) { |
|
954 | + $this->registerService(\OCP\IRequest::class, function($c) { |
|
955 | 955 | if (isset($this['urlParams'])) { |
956 | 956 | $urlParams = $this['urlParams']; |
957 | 957 | } else { |
@@ -988,7 +988,7 @@ discard block |
||
988 | 988 | /** @deprecated 19.0.0 */ |
989 | 989 | $this->registerDeprecatedAlias('Request', \OCP\IRequest::class); |
990 | 990 | |
991 | - $this->registerService(IMailer::class, function (Server $c) { |
|
991 | + $this->registerService(IMailer::class, function(Server $c) { |
|
992 | 992 | return new Mailer( |
993 | 993 | $c->getConfig(), |
994 | 994 | $c->getLogger(), |
@@ -1002,7 +1002,7 @@ discard block |
||
1002 | 1002 | /** @deprecated 19.0.0 */ |
1003 | 1003 | $this->registerDeprecatedAlias('Mailer', IMailer::class); |
1004 | 1004 | |
1005 | - $this->registerService('LDAPProvider', function (Server $c) { |
|
1005 | + $this->registerService('LDAPProvider', function(Server $c) { |
|
1006 | 1006 | $config = $c->getConfig(); |
1007 | 1007 | $factoryClass = $config->getSystemValue('ldapProviderFactory', null); |
1008 | 1008 | if (is_null($factoryClass)) { |
@@ -1012,7 +1012,7 @@ discard block |
||
1012 | 1012 | $factory = new $factoryClass($this); |
1013 | 1013 | return $factory->getLDAPProvider(); |
1014 | 1014 | }); |
1015 | - $this->registerService(ILockingProvider::class, function (Server $c) { |
|
1015 | + $this->registerService(ILockingProvider::class, function(Server $c) { |
|
1016 | 1016 | $ini = $c->get(IniGetWrapper::class); |
1017 | 1017 | $config = $c->getConfig(); |
1018 | 1018 | $ttl = $config->getSystemValue('filelocking.ttl', max(3600, $ini->getNumeric('max_execution_time'))); |
@@ -1040,12 +1040,12 @@ discard block |
||
1040 | 1040 | /** @deprecated 19.0.0 */ |
1041 | 1041 | $this->registerDeprecatedAlias('MountManager', IMountManager::class); |
1042 | 1042 | |
1043 | - $this->registerService(IMimeTypeDetector::class, function (Server $c) { |
|
1043 | + $this->registerService(IMimeTypeDetector::class, function(Server $c) { |
|
1044 | 1044 | return new \OC\Files\Type\Detection( |
1045 | 1045 | $c->getURLGenerator(), |
1046 | 1046 | $c->getLogger(), |
1047 | 1047 | \OC::$configDir, |
1048 | - \OC::$SERVERROOT . '/resources/config/' |
|
1048 | + \OC::$SERVERROOT.'/resources/config/' |
|
1049 | 1049 | ); |
1050 | 1050 | }); |
1051 | 1051 | /** @deprecated 19.0.0 */ |
@@ -1054,19 +1054,19 @@ discard block |
||
1054 | 1054 | $this->registerAlias(IMimeTypeLoader::class, Loader::class); |
1055 | 1055 | /** @deprecated 19.0.0 */ |
1056 | 1056 | $this->registerDeprecatedAlias('MimeTypeLoader', IMimeTypeLoader::class); |
1057 | - $this->registerService(BundleFetcher::class, function () { |
|
1057 | + $this->registerService(BundleFetcher::class, function() { |
|
1058 | 1058 | return new BundleFetcher($this->getL10N('lib')); |
1059 | 1059 | }); |
1060 | 1060 | $this->registerAlias(\OCP\Notification\IManager::class, Manager::class); |
1061 | 1061 | /** @deprecated 19.0.0 */ |
1062 | 1062 | $this->registerDeprecatedAlias('NotificationManager', \OCP\Notification\IManager::class); |
1063 | 1063 | |
1064 | - $this->registerService(CapabilitiesManager::class, function (Server $c) { |
|
1064 | + $this->registerService(CapabilitiesManager::class, function(Server $c) { |
|
1065 | 1065 | $manager = new CapabilitiesManager($c->getLogger()); |
1066 | - $manager->registerCapability(function () use ($c) { |
|
1066 | + $manager->registerCapability(function() use ($c) { |
|
1067 | 1067 | return new \OC\OCS\CoreCapabilities($c->getConfig()); |
1068 | 1068 | }); |
1069 | - $manager->registerCapability(function () use ($c) { |
|
1069 | + $manager->registerCapability(function() use ($c) { |
|
1070 | 1070 | return $c->query(\OC\Security\Bruteforce\Capabilities::class); |
1071 | 1071 | }); |
1072 | 1072 | return $manager; |
@@ -1074,14 +1074,14 @@ discard block |
||
1074 | 1074 | /** @deprecated 19.0.0 */ |
1075 | 1075 | $this->registerDeprecatedAlias('CapabilitiesManager', CapabilitiesManager::class); |
1076 | 1076 | |
1077 | - $this->registerService(ICommentsManager::class, function (Server $c) { |
|
1077 | + $this->registerService(ICommentsManager::class, function(Server $c) { |
|
1078 | 1078 | $config = $c->getConfig(); |
1079 | 1079 | $factoryClass = $config->getSystemValue('comments.managerFactory', CommentsManagerFactory::class); |
1080 | 1080 | /** @var \OCP\Comments\ICommentsManagerFactory $factory */ |
1081 | 1081 | $factory = new $factoryClass($this); |
1082 | 1082 | $manager = $factory->getManager(); |
1083 | 1083 | |
1084 | - $manager->registerDisplayNameResolver('user', function ($id) use ($c) { |
|
1084 | + $manager->registerDisplayNameResolver('user', function($id) use ($c) { |
|
1085 | 1085 | $manager = $c->getUserManager(); |
1086 | 1086 | $user = $manager->get($id); |
1087 | 1087 | if (is_null($user)) { |
@@ -1099,7 +1099,7 @@ discard block |
||
1099 | 1099 | $this->registerDeprecatedAlias('CommentsManager', ICommentsManager::class); |
1100 | 1100 | |
1101 | 1101 | $this->registerAlias(\OC_Defaults::class, 'ThemingDefaults'); |
1102 | - $this->registerService('ThemingDefaults', function (Server $c) { |
|
1102 | + $this->registerService('ThemingDefaults', function(Server $c) { |
|
1103 | 1103 | /* |
1104 | 1104 | * Dark magic for autoloader. |
1105 | 1105 | * If we do a class_exists it will try to load the class which will |
@@ -1127,7 +1127,7 @@ discard block |
||
1127 | 1127 | } |
1128 | 1128 | return new \OC_Defaults(); |
1129 | 1129 | }); |
1130 | - $this->registerService(JSCombiner::class, function (Server $c) { |
|
1130 | + $this->registerService(JSCombiner::class, function(Server $c) { |
|
1131 | 1131 | return new JSCombiner( |
1132 | 1132 | $c->getAppDataDir('js'), |
1133 | 1133 | $c->getURLGenerator(), |
@@ -1141,7 +1141,7 @@ discard block |
||
1141 | 1141 | $this->registerDeprecatedAlias('EventDispatcher', \OC\EventDispatcher\SymfonyAdapter::class); |
1142 | 1142 | $this->registerAlias(EventDispatcherInterface::class, \OC\EventDispatcher\SymfonyAdapter::class); |
1143 | 1143 | |
1144 | - $this->registerService('CryptoWrapper', function (Server $c) { |
|
1144 | + $this->registerService('CryptoWrapper', function(Server $c) { |
|
1145 | 1145 | // FIXME: Instantiiated here due to cyclic dependency |
1146 | 1146 | $request = new Request( |
1147 | 1147 | [ |
@@ -1168,14 +1168,14 @@ discard block |
||
1168 | 1168 | }); |
1169 | 1169 | /** @deprecated 19.0.0 */ |
1170 | 1170 | $this->registerDeprecatedAlias('CsrfTokenManager', CsrfTokenManager::class); |
1171 | - $this->registerService(SessionStorage::class, function (Server $c) { |
|
1171 | + $this->registerService(SessionStorage::class, function(Server $c) { |
|
1172 | 1172 | return new SessionStorage($c->getSession()); |
1173 | 1173 | }); |
1174 | 1174 | $this->registerAlias(\OCP\Security\IContentSecurityPolicyManager::class, ContentSecurityPolicyManager::class); |
1175 | 1175 | /** @deprecated 19.0.0 */ |
1176 | 1176 | $this->registerDeprecatedAlias('ContentSecurityPolicyManager', ContentSecurityPolicyManager::class); |
1177 | 1177 | |
1178 | - $this->registerService(\OCP\Share\IManager::class, function (Server $c) { |
|
1178 | + $this->registerService(\OCP\Share\IManager::class, function(Server $c) { |
|
1179 | 1179 | $config = $c->getConfig(); |
1180 | 1180 | $factoryClass = $config->getSystemValue('sharing.managerFactory', ProviderFactory::class); |
1181 | 1181 | /** @var \OCP\Share\IProviderFactory $factory */ |
@@ -1205,7 +1205,7 @@ discard block |
||
1205 | 1205 | /** @deprecated 19.0.0 */ |
1206 | 1206 | $this->registerDeprecatedAlias('ShareManager', \OCP\Share\IManager::class); |
1207 | 1207 | |
1208 | - $this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function (Server $c) { |
|
1208 | + $this->registerService(\OCP\Collaboration\Collaborators\ISearch::class, function(Server $c) { |
|
1209 | 1209 | $instance = new Collaboration\Collaborators\Search($c); |
1210 | 1210 | |
1211 | 1211 | // register default plugins |
@@ -1228,34 +1228,34 @@ discard block |
||
1228 | 1228 | |
1229 | 1229 | $this->registerDeprecatedAlias('SettingsManager', \OC\Settings\Manager::class); |
1230 | 1230 | $this->registerAlias(\OCP\Settings\IManager::class, \OC\Settings\Manager::class); |
1231 | - $this->registerService(\OC\Files\AppData\Factory::class, function (Server $c) { |
|
1231 | + $this->registerService(\OC\Files\AppData\Factory::class, function(Server $c) { |
|
1232 | 1232 | return new \OC\Files\AppData\Factory( |
1233 | 1233 | $c->getRootFolder(), |
1234 | 1234 | $c->getSystemConfig() |
1235 | 1235 | ); |
1236 | 1236 | }); |
1237 | 1237 | |
1238 | - $this->registerService('LockdownManager', function (Server $c) { |
|
1239 | - return new LockdownManager(function () use ($c) { |
|
1238 | + $this->registerService('LockdownManager', function(Server $c) { |
|
1239 | + return new LockdownManager(function() use ($c) { |
|
1240 | 1240 | return $c->getSession(); |
1241 | 1241 | }); |
1242 | 1242 | }); |
1243 | 1243 | |
1244 | - $this->registerService(\OCP\OCS\IDiscoveryService::class, function (Server $c) { |
|
1244 | + $this->registerService(\OCP\OCS\IDiscoveryService::class, function(Server $c) { |
|
1245 | 1245 | return new DiscoveryService($c->getMemCacheFactory(), $c->getHTTPClientService()); |
1246 | 1246 | }); |
1247 | 1247 | |
1248 | - $this->registerService(ICloudIdManager::class, function (Server $c) { |
|
1248 | + $this->registerService(ICloudIdManager::class, function(Server $c) { |
|
1249 | 1249 | return new CloudIdManager(); |
1250 | 1250 | }); |
1251 | 1251 | |
1252 | 1252 | $this->registerAlias(\OCP\GlobalScale\IConfig::class, \OC\GlobalScale\Config::class); |
1253 | 1253 | |
1254 | - $this->registerService(ICloudFederationProviderManager::class, function (Server $c) { |
|
1254 | + $this->registerService(ICloudFederationProviderManager::class, function(Server $c) { |
|
1255 | 1255 | return new CloudFederationProviderManager($c->getAppManager(), $c->getHTTPClientService(), $c->getCloudIdManager(), $c->getLogger()); |
1256 | 1256 | }); |
1257 | 1257 | |
1258 | - $this->registerService(ICloudFederationFactory::class, function (Server $c) { |
|
1258 | + $this->registerService(ICloudFederationFactory::class, function(Server $c) { |
|
1259 | 1259 | return new CloudFederationFactory(); |
1260 | 1260 | }); |
1261 | 1261 | |
@@ -1267,7 +1267,7 @@ discard block |
||
1267 | 1267 | /** @deprecated 19.0.0 */ |
1268 | 1268 | $this->registerDeprecatedAlias('TimeFactory', \OCP\AppFramework\Utility\ITimeFactory::class); |
1269 | 1269 | |
1270 | - $this->registerService(Defaults::class, function (Server $c) { |
|
1270 | + $this->registerService(Defaults::class, function(Server $c) { |
|
1271 | 1271 | return new Defaults( |
1272 | 1272 | $c->getThemingDefaults() |
1273 | 1273 | ); |
@@ -1275,17 +1275,17 @@ discard block |
||
1275 | 1275 | /** @deprecated 19.0.0 */ |
1276 | 1276 | $this->registerDeprecatedAlias('Defaults', \OCP\Defaults::class); |
1277 | 1277 | |
1278 | - $this->registerService(\OCP\ISession::class, function (SimpleContainer $c) { |
|
1278 | + $this->registerService(\OCP\ISession::class, function(SimpleContainer $c) { |
|
1279 | 1279 | return $c->query(\OCP\IUserSession::class)->getSession(); |
1280 | 1280 | }); |
1281 | 1281 | |
1282 | - $this->registerService(IShareHelper::class, function (Server $c) { |
|
1282 | + $this->registerService(IShareHelper::class, function(Server $c) { |
|
1283 | 1283 | return new ShareHelper( |
1284 | 1284 | $c->query(\OCP\Share\IManager::class) |
1285 | 1285 | ); |
1286 | 1286 | }); |
1287 | 1287 | |
1288 | - $this->registerService(Installer::class, function (Server $c) { |
|
1288 | + $this->registerService(Installer::class, function(Server $c) { |
|
1289 | 1289 | return new Installer( |
1290 | 1290 | $c->getAppFetcher(), |
1291 | 1291 | $c->getHTTPClientService(), |
@@ -1296,11 +1296,11 @@ discard block |
||
1296 | 1296 | ); |
1297 | 1297 | }); |
1298 | 1298 | |
1299 | - $this->registerService(IApiFactory::class, function (Server $c) { |
|
1299 | + $this->registerService(IApiFactory::class, function(Server $c) { |
|
1300 | 1300 | return new ApiFactory($c->getHTTPClientService()); |
1301 | 1301 | }); |
1302 | 1302 | |
1303 | - $this->registerService(IInstanceFactory::class, function (Server $c) { |
|
1303 | + $this->registerService(IInstanceFactory::class, function(Server $c) { |
|
1304 | 1304 | $memcacheFactory = $c->getMemCacheFactory(); |
1305 | 1305 | return new InstanceFactory($memcacheFactory->createLocal('remoteinstance.'), $c->getHTTPClientService()); |
1306 | 1306 | }); |
@@ -1357,7 +1357,7 @@ discard block |
||
1357 | 1357 | $dispatcher = $this->getEventDispatcher(); |
1358 | 1358 | |
1359 | 1359 | // Delete avatar on user deletion |
1360 | - $dispatcher->addListener('OCP\IUser::preDelete', function (GenericEvent $e) { |
|
1360 | + $dispatcher->addListener('OCP\IUser::preDelete', function(GenericEvent $e) { |
|
1361 | 1361 | $logger = $this->getLogger(); |
1362 | 1362 | $manager = $this->getAvatarManager(); |
1363 | 1363 | /** @var IUser $user */ |
@@ -1370,11 +1370,11 @@ discard block |
||
1370 | 1370 | // no avatar to remove |
1371 | 1371 | } catch (\Exception $e) { |
1372 | 1372 | // Ignore exceptions |
1373 | - $logger->info('Could not cleanup avatar of ' . $user->getUID()); |
|
1373 | + $logger->info('Could not cleanup avatar of '.$user->getUID()); |
|
1374 | 1374 | } |
1375 | 1375 | }); |
1376 | 1376 | |
1377 | - $dispatcher->addListener('OCP\IUser::changeUser', function (GenericEvent $e) { |
|
1377 | + $dispatcher->addListener('OCP\IUser::changeUser', function(GenericEvent $e) { |
|
1378 | 1378 | $manager = $this->getAvatarManager(); |
1379 | 1379 | /** @var IUser $user */ |
1380 | 1380 | $user = $e->getSubject(); |
@@ -2280,11 +2280,11 @@ discard block |
||
2280 | 2280 | } |
2281 | 2281 | |
2282 | 2282 | private function registerDeprecatedAlias(string $alias, string $target) { |
2283 | - $this->registerService($alias, function (ContainerInterface $container) use ($target, $alias) { |
|
2283 | + $this->registerService($alias, function(ContainerInterface $container) use ($target, $alias) { |
|
2284 | 2284 | try { |
2285 | 2285 | /** @var ILogger $logger */ |
2286 | 2286 | $logger = $container->get(ILogger::class); |
2287 | - $logger->debug('The requested alias "' . $alias . '" is depreacted. Please request "' . $target . '" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']); |
|
2287 | + $logger->debug('The requested alias "'.$alias.'" is depreacted. Please request "'.$target.'" directly. This alias will be removed in a future Nextcloud version.', ['app' => 'serverDI']); |
|
2288 | 2288 | } catch (ContainerExceptionInterface $e) { |
2289 | 2289 | // Could not get logger. Continue |
2290 | 2290 | } |