aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Command/CreateAddressBook.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Command/CreateAddressBook.php')
-rw-r--r--apps/dav/lib/Command/CreateAddressBook.php22
1 files changed, 5 insertions, 17 deletions
diff --git a/apps/dav/lib/Command/CreateAddressBook.php b/apps/dav/lib/Command/CreateAddressBook.php
index 3d56d95868d..9dfc539a25d 100644
--- a/apps/dav/lib/Command/CreateAddressBook.php
+++ b/apps/dav/lib/Command/CreateAddressBook.php
@@ -32,26 +32,14 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class CreateAddressBook extends Command {
-
- /** @var IUserManager */
- private $userManager;
-
- /** @var CardDavBackend */
- private $cardDavBackend;
-
- /**
- * @param IUserManager $userManager
- * @param CardDavBackend $cardDavBackend
- */
- public function __construct(IUserManager $userManager,
- CardDavBackend $cardDavBackend
+ public function __construct(
+ private IUserManager $userManager,
+ private CardDavBackend $cardDavBackend,
) {
parent::__construct();
- $this->userManager = $userManager;
- $this->cardDavBackend = $cardDavBackend;
}
- protected function configure() {
+ protected function configure(): void {
$this
->setName('dav:create-addressbook')
->setDescription('Create a dav addressbook')
@@ -71,6 +59,6 @@ class CreateAddressBook extends Command {
$name = $input->getArgument('name');
$this->cardDavBackend->createAddressBook("principals/users/$user", $name, []);
- return 0;
+ return self::SUCCESS;
}
}