diff options
author | provokateurin <kate@provokateurin.de> | 2024-10-18 12:04:22 +0200 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2024-10-21 12:37:59 +0200 |
commit | 381077028adf388a7081cf42026570c6be47b198 (patch) | |
tree | c0f8e9b6caea80d6b55d6fdcc9188ba57197fa0f /apps/dav/lib/CalDAV/Calendar.php | |
parent | 4d8d11d2f79da348644e0902e78a2f000498cd52 (diff) | |
download | nextcloud-server-381077028adf388a7081cf42026570c6be47b198.tar.gz nextcloud-server-381077028adf388a7081cf42026570c6be47b198.zip |
refactor(apps): Use constructor property promotion when possible
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'apps/dav/lib/CalDAV/Calendar.php')
-rw-r--r-- | apps/dav/lib/CalDAV/Calendar.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php index d3e0b3b2226..6fd7d147131 100644 --- a/apps/dav/lib/CalDAV/Calendar.php +++ b/apps/dav/lib/CalDAV/Calendar.php @@ -31,12 +31,16 @@ use Sabre\DAV\PropPatch; * @property CalDavBackend $caldavBackend */ class Calendar extends \Sabre\CalDAV\Calendar implements IRestorable, IShareable, IMoveTarget { - private IConfig $config; protected IL10N $l10n; private bool $useTrashbin = true; - private LoggerInterface $logger; - public function __construct(BackendInterface $caldavBackend, $calendarInfo, IL10N $l10n, IConfig $config, LoggerInterface $logger) { + public function __construct( + BackendInterface $caldavBackend, + $calendarInfo, + IL10N $l10n, + private IConfig $config, + private LoggerInterface $logger, + ) { // Convert deletion date to ISO8601 string if (isset($calendarInfo[TrashbinPlugin::PROPERTY_DELETED_AT])) { $calendarInfo[TrashbinPlugin::PROPERTY_DELETED_AT] = (new DateTimeImmutable()) @@ -53,10 +57,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IRestorable, IShareable $this->calendarInfo['{DAV:}displayname'] === CalDavBackend::PERSONAL_CALENDAR_NAME) { $this->calendarInfo['{DAV:}displayname'] = $l10n->t('Personal'); } - - $this->config = $config; $this->l10n = $l10n; - $this->logger = $logger; } /** |