diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-06-14 15:26:15 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-06-22 10:25:17 +0200 |
commit | 3598ec40285b88d4f8f03a4db8d3a085a521d2df (patch) | |
tree | c0a29d567de0539b6e6e97bf9f0e2ce79bbc5ac0 /apps/dav/lib/Command | |
parent | de82d4f67ca8d12a0209598f9cdd55302d546524 (diff) | |
download | nextcloud-server-3598ec40285b88d4f8f03a4db8d3a085a521d2df.tar.gz nextcloud-server-3598ec40285b88d4f8f03a4db8d3a085a521d2df.zip |
Add typing to Sharing Backend
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/dav/lib/Command')
-rw-r--r-- | apps/dav/lib/Command/MoveCalendar.php | 44 |
1 files changed, 10 insertions, 34 deletions
diff --git a/apps/dav/lib/Command/MoveCalendar.php b/apps/dav/lib/Command/MoveCalendar.php index 320fe8aeac6..9272b20b10d 100644 --- a/apps/dav/lib/Command/MoveCalendar.php +++ b/apps/dav/lib/Command/MoveCalendar.php @@ -42,41 +42,17 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; class MoveCalendar extends Command { - - /** @var IUserManager */ - private $userManager; - - /** @var IGroupManager */ - private $groupManager; - - /** @var IShareManager */ - private $shareManager; - - /** @var IConfig $config */ - private $config; - - /** @var IL10N */ - private $l10n; - - /** @var SymfonyStyle */ - private $io; - - /** @var CalDavBackend */ - private $calDav; - - /** @var LoggerInterface */ - private $logger; + private IUserManager $userManager; + private IGroupManager $groupManager; + private IShareManager $shareManager; + private IConfig $config; + private IL10N $l10n; + private ?SymfonyStyle $io = null; + private CalDavBackend $calDav; + private LoggerInterface $logger; public const URI_USERS = 'principals/users/'; - /** - * @param IUserManager $userManager - * @param IGroupManager $groupManager - * @param IShareManager $shareManager - * @param IConfig $config - * @param IL10N $l10n - * @param CalDavBackend $calDav - */ public function __construct( IUserManager $userManager, IGroupManager $groupManager, @@ -224,7 +200,7 @@ class MoveCalendar extends Command { */ if ($this->shareManager->shareWithGroupMembersOnly() === true && 'groups' === $prefix && !$this->groupManager->isInGroup($userDestination, $userOrGroup)) { if ($force) { - $this->calDav->updateShares(new Calendar($this->calDav, $calendar, $this->l10n, $this->config, $this->logger), [], ['href' => 'principal:principals/groups/' . $userOrGroup]); + $this->calDav->updateShares(new Calendar($this->calDav, $calendar, $this->l10n, $this->config, $this->logger), [], ['principal:principals/groups/' . $userOrGroup]); } else { throw new \InvalidArgumentException("User <$userDestination> is not part of the group <$userOrGroup> with whom the calendar <" . $calendar['uri'] . "> was shared. You may use -f to move the calendar while deleting this share."); } @@ -235,7 +211,7 @@ class MoveCalendar extends Command { */ if ($userOrGroup === $userDestination) { if ($force) { - $this->calDav->updateShares(new Calendar($this->calDav, $calendar, $this->l10n, $this->config, $this->logger), [], ['href' => 'principal:principals/users/' . $userOrGroup]); + $this->calDav->updateShares(new Calendar($this->calDav, $calendar, $this->l10n, $this->config, $this->logger), [], ['principal:principals/users/' . $userOrGroup]); } else { throw new \InvalidArgumentException("The calendar <" . $calendar['uri'] . "> is already shared to user <$userDestination>.You may use -f to move the calendar while deleting this share."); } |