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