aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/appinfo
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-20 01:15:24 +0200
committerJoas Schilling <coding@schilljs.com>2016-09-20 01:15:24 +0200
commit1944d9b3abb5f3f20fa5e2ba2004dbd7994bb13f (patch)
tree51684f9a9b3a34deaebaec0fe00eede1c8c833b3 /apps/dav/appinfo
parentf4a4578f0de9cd0e41786b1af20ca642af390101 (diff)
downloadnextcloud-server-1944d9b3abb5f3f20fa5e2ba2004dbd7994bb13f.tar.gz
nextcloud-server-1944d9b3abb5f3f20fa5e2ba2004dbd7994bb13f.zip
Use magic DI
Diffstat (limited to 'apps/dav/appinfo')
-rw-r--r--apps/dav/appinfo/app.php5
-rw-r--r--apps/dav/appinfo/register_command.php4
2 files changed, 5 insertions, 4 deletions
diff --git a/apps/dav/appinfo/app.php b/apps/dav/appinfo/app.php
index ebc1d09e3f1..0d417fd3fed 100644
--- a/apps/dav/appinfo/app.php
+++ b/apps/dav/appinfo/app.php
@@ -23,6 +23,7 @@
*/
use OCA\DAV\AppInfo\Application;
+use OCA\DAV\CardDAV\CardDavBackend;
use Symfony\Component\EventDispatcher\GenericEvent;
$app = new Application();
@@ -36,8 +37,8 @@ $eventDispatcher = \OC::$server->getEventDispatcher();
$eventDispatcher->addListener('OCP\Federation\TrustedServerEvent::remove',
function(GenericEvent $event) use ($app) {
- /** @var \OCA\DAV\CardDAV\CardDavBackend $cardDavBackend */
- $cardDavBackend = $app->getContainer()->query('CardDavBackend');
+ /** @var CardDavBackend $cardDavBackend */
+ $cardDavBackend = $app->getContainer()->query(CardDavBackend::class);
$addressBookUri = $event->getSubject();
$addressBook = $cardDavBackend->getAddressBooksByUri('principals/system/system', $addressBookUri);
if (!is_null($addressBook)) {
diff --git a/apps/dav/appinfo/register_command.php b/apps/dav/appinfo/register_command.php
index 7595c1b8335..57bf8ff5dd9 100644
--- a/apps/dav/appinfo/register_command.php
+++ b/apps/dav/appinfo/register_command.php
@@ -34,6 +34,6 @@ $app = new Application();
/** @var Symfony\Component\Console\Application $application */
$application->add(new CreateCalendar($userManager, $groupManager, $dbConnection));
-$application->add(new CreateAddressBook($userManager, $app->getContainer()->query('CardDavBackend')));
+$application->add(new CreateAddressBook($userManager, $app->getContainer()->query(\OCA\DAV\CardDAV\CardDavBackend::class)));
$application->add(new SyncSystemAddressBook($app->getSyncService()));
-$application->add(new SyncBirthdayCalendar($userManager, $app->getContainer()->query('BirthdayService')));
+$application->add(new SyncBirthdayCalendar($userManager, $app->getContainer()->query(\OCA\DAV\CalDAV\BirthdayService::class)));