aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Events
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Events')
-rw-r--r--apps/dav/lib/Events/AddressBookCreatedEvent.php14
-rw-r--r--apps/dav/lib/Events/AddressBookDeletedEvent.php20
-rw-r--r--apps/dav/lib/Events/AddressBookShareUpdatedEvent.php32
-rw-r--r--apps/dav/lib/Events/AddressBookUpdatedEvent.php26
-rw-r--r--apps/dav/lib/Events/BeforeFileDirectDownloadedEvent.php7
-rw-r--r--apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php26
-rw-r--r--apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php26
-rw-r--r--apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php26
-rw-r--r--apps/dav/lib/Events/CalendarCreatedEvent.php14
-rw-r--r--apps/dav/lib/Events/CalendarDeletedEvent.php20
-rw-r--r--apps/dav/lib/Events/CalendarMovedToTrashEvent.php20
-rw-r--r--apps/dav/lib/Events/CalendarObjectCreatedEvent.php26
-rw-r--r--apps/dav/lib/Events/CalendarObjectDeletedEvent.php26
-rw-r--r--apps/dav/lib/Events/CalendarObjectMovedEvent.php31
-rw-r--r--apps/dav/lib/Events/CalendarObjectMovedToTrashEvent.php26
-rw-r--r--apps/dav/lib/Events/CalendarObjectRestoredEvent.php26
-rw-r--r--apps/dav/lib/Events/CalendarObjectUpdatedEvent.php26
-rw-r--r--apps/dav/lib/Events/CalendarPublishedEvent.php15
-rw-r--r--apps/dav/lib/Events/CalendarRestoredEvent.php20
-rw-r--r--apps/dav/lib/Events/CalendarShareUpdatedEvent.php31
-rw-r--r--apps/dav/lib/Events/CalendarUnpublishedEvent.php11
-rw-r--r--apps/dav/lib/Events/CalendarUpdatedEvent.php26
-rw-r--r--apps/dav/lib/Events/CardCreatedEvent.php26
-rw-r--r--apps/dav/lib/Events/CardDeletedEvent.php26
-rw-r--r--apps/dav/lib/Events/CardMovedEvent.php31
-rw-r--r--apps/dav/lib/Events/CardUpdatedEvent.php26
-rw-r--r--apps/dav/lib/Events/SabrePluginAddEvent.php8
-rw-r--r--apps/dav/lib/Events/SabrePluginAuthInitEvent.php8
-rw-r--r--apps/dav/lib/Events/SubscriptionCreatedEvent.php14
-rw-r--r--apps/dav/lib/Events/SubscriptionDeletedEvent.php20
-rw-r--r--apps/dav/lib/Events/SubscriptionUpdatedEvent.php26
31 files changed, 171 insertions, 509 deletions
diff --git a/apps/dav/lib/Events/AddressBookCreatedEvent.php b/apps/dav/lib/Events/AddressBookCreatedEvent.php
index ec8e3cb6116..1a56bcbf63f 100644
--- a/apps/dav/lib/Events/AddressBookCreatedEvent.php
+++ b/apps/dav/lib/Events/AddressBookCreatedEvent.php
@@ -18,12 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class AddressBookCreatedEvent extends Event {
- /** @var int */
- private $addressBookId;
-
- /** @var array */
- private $addressBookData;
-
/**
* AddressBookCreatedEvent constructor.
*
@@ -31,11 +25,11 @@ class AddressBookCreatedEvent extends Event {
* @param array $addressBookData
* @since 20.0.0
*/
- public function __construct(int $addressBookId,
- array $addressBookData) {
+ public function __construct(
+ private int $addressBookId,
+ private array $addressBookData,
+ ) {
parent::__construct();
- $this->addressBookId = $addressBookId;
- $this->addressBookData = $addressBookData;
}
/**
diff --git a/apps/dav/lib/Events/AddressBookDeletedEvent.php b/apps/dav/lib/Events/AddressBookDeletedEvent.php
index bc46106a47a..b1ec4125513 100644
--- a/apps/dav/lib/Events/AddressBookDeletedEvent.php
+++ b/apps/dav/lib/Events/AddressBookDeletedEvent.php
@@ -18,15 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class AddressBookDeletedEvent extends Event {
- /** @var int */
- private $addressBookId;
-
- /** @var array */
- private $addressBookData;
-
- /** @var array */
- private $shares;
-
/**
* AddressBookDeletedEvent constructor.
*
@@ -35,13 +26,12 @@ class AddressBookDeletedEvent extends Event {
* @param array $shares
* @since 20.0.0
*/
- public function __construct(int $addressBookId,
- array $addressBookData,
- array $shares) {
+ public function __construct(
+ private int $addressBookId,
+ private array $addressBookData,
+ private array $shares,
+ ) {
parent::__construct();
- $this->addressBookId = $addressBookId;
- $this->addressBookData = $addressBookData;
- $this->shares = $shares;
}
/**
diff --git a/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php b/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php
index 14a63bee4a6..9a574fb548e 100644
--- a/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php
+++ b/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php
@@ -18,21 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class AddressBookShareUpdatedEvent extends Event {
- /** @var int */
- private $addressBookId;
-
- /** @var array */
- private $addressBookData;
-
- /** @var array */
- private $oldShares;
-
- /** @var array */
- private $added;
-
- /** @var array */
- private $removed;
-
/**
* AddressBookShareUpdatedEvent constructor.
*
@@ -43,17 +28,14 @@ class AddressBookShareUpdatedEvent extends Event {
* @param array $removed
* @since 20.0.0
*/
- public function __construct(int $addressBookId,
- array $addressBookData,
- array $oldShares,
- array $added,
- array $removed) {
+ public function __construct(
+ private int $addressBookId,
+ private array $addressBookData,
+ private array $oldShares,
+ private array $added,
+ private array $removed,
+ ) {
parent::__construct();
- $this->addressBookId = $addressBookId;
- $this->addressBookData = $addressBookData;
- $this->oldShares = $oldShares;
- $this->added = $added;
- $this->removed = $removed;
}
/**
diff --git a/apps/dav/lib/Events/AddressBookUpdatedEvent.php b/apps/dav/lib/Events/AddressBookUpdatedEvent.php
index 48e2f101f7e..fe6dc024cd2 100644
--- a/apps/dav/lib/Events/AddressBookUpdatedEvent.php
+++ b/apps/dav/lib/Events/AddressBookUpdatedEvent.php
@@ -18,18 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class AddressBookUpdatedEvent extends Event {
- /** @var int */
- private $addressBookId;
-
- /** @var array */
- private $addressBookData;
-
- /** @var array */
- private $shares;
-
- /** @var array */
- private $mutations;
-
/**
* AddressBookUpdatedEvent constructor.
*
@@ -39,15 +27,13 @@ class AddressBookUpdatedEvent extends Event {
* @param array $mutations
* @since 20.0.0
*/
- public function __construct(int $addressBookId,
- array $addressBookData,
- array $shares,
- array $mutations) {
+ public function __construct(
+ private int $addressBookId,
+ private array $addressBookData,
+ private array $shares,
+ private array $mutations,
+ ) {
parent::__construct();
- $this->addressBookId = $addressBookId;
- $this->addressBookData = $addressBookData;
- $this->shares = $shares;
- $this->mutations = $mutations;
}
/**
diff --git a/apps/dav/lib/Events/BeforeFileDirectDownloadedEvent.php b/apps/dav/lib/Events/BeforeFileDirectDownloadedEvent.php
index adaa7f1a81c..a79d730e8ff 100644
--- a/apps/dav/lib/Events/BeforeFileDirectDownloadedEvent.php
+++ b/apps/dav/lib/Events/BeforeFileDirectDownloadedEvent.php
@@ -15,11 +15,10 @@ use OCP\Files\File;
* @since 22.0.0
*/
class BeforeFileDirectDownloadedEvent extends Event {
- private $file;
-
- public function __construct(File $file) {
+ public function __construct(
+ private File $file,
+ ) {
parent::__construct();
- $this->file = $file;
}
/**
diff --git a/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php b/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php
index 536472de6fe..ea1c344ed27 100644
--- a/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php
+++ b/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php
@@ -18,18 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class CachedCalendarObjectCreatedEvent extends Event {
- /** @var int */
- private $subscriptionId;
-
- /** @var array */
- private $subscriptionData;
-
- /** @var array */
- private $shares;
-
- /** @var array */
- private $objectData;
-
/**
* CachedCalendarObjectCreatedEvent constructor.
*
@@ -39,15 +27,13 @@ class CachedCalendarObjectCreatedEvent extends Event {
* @param array $objectData
* @since 20.0.0
*/
- public function __construct(int $subscriptionId,
- array $subscriptionData,
- array $shares,
- array $objectData) {
+ public function __construct(
+ private int $subscriptionId,
+ private array $subscriptionData,
+ private array $shares,
+ private array $objectData,
+ ) {
parent::__construct();
- $this->subscriptionId = $subscriptionId;
- $this->subscriptionData = $subscriptionData;
- $this->shares = $shares;
- $this->objectData = $objectData;
}
/**
diff --git a/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php b/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php
index c3d98fd94d9..8f8e55d32e5 100644
--- a/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php
+++ b/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php
@@ -18,18 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class CachedCalendarObjectDeletedEvent extends Event {
- /** @var int */
- private $subscriptionId;
-
- /** @var array */
- private $subscriptionData;
-
- /** @var array */
- private $shares;
-
- /** @var array */
- private $objectData;
-
/**
* CachedCalendarObjectDeletedEvent constructor.
*
@@ -39,15 +27,13 @@ class CachedCalendarObjectDeletedEvent extends Event {
* @param array $objectData
* @since 20.0.0
*/
- public function __construct(int $subscriptionId,
- array $subscriptionData,
- array $shares,
- array $objectData) {
+ public function __construct(
+ private int $subscriptionId,
+ private array $subscriptionData,
+ private array $shares,
+ private array $objectData,
+ ) {
parent::__construct();
- $this->subscriptionId = $subscriptionId;
- $this->subscriptionData = $subscriptionData;
- $this->shares = $shares;
- $this->objectData = $objectData;
}
/**
diff --git a/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php b/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php
index 12c712a2aa7..0adb4164dc9 100644
--- a/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php
+++ b/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php
@@ -18,18 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class CachedCalendarObjectUpdatedEvent extends Event {
- /** @var int */
- private $subscriptionId;
-
- /** @var array */
- private $subscriptionData;
-
- /** @var array */
- private $shares;
-
- /** @var array */
- private $objectData;
-
/**
* CachedCalendarObjectUpdatedEvent constructor.
*
@@ -39,15 +27,13 @@ class CachedCalendarObjectUpdatedEvent extends Event {
* @param array $objectData
* @since 20.0.0
*/
- public function __construct(int $subscriptionId,
- array $subscriptionData,
- array $shares,
- array $objectData) {
+ public function __construct(
+ private int $subscriptionId,
+ private array $subscriptionData,
+ private array $shares,
+ private array $objectData,
+ ) {
parent::__construct();
- $this->subscriptionId = $subscriptionId;
- $this->subscriptionData = $subscriptionData;
- $this->shares = $shares;
- $this->objectData = $objectData;
}
/**
diff --git a/apps/dav/lib/Events/CalendarCreatedEvent.php b/apps/dav/lib/Events/CalendarCreatedEvent.php
index abefda54358..46d1194914e 100644
--- a/apps/dav/lib/Events/CalendarCreatedEvent.php
+++ b/apps/dav/lib/Events/CalendarCreatedEvent.php
@@ -18,12 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class CalendarCreatedEvent extends Event {
- /** @var int */
- private $calendarId;
-
- /** @var array */
- private $calendarData;
-
/**
* CalendarCreatedEvent constructor.
*
@@ -31,11 +25,11 @@ class CalendarCreatedEvent extends Event {
* @param array $calendarData
* @since 20.0.0
*/
- public function __construct(int $calendarId,
- array $calendarData) {
+ public function __construct(
+ private int $calendarId,
+ private array $calendarData,
+ ) {
parent::__construct();
- $this->calendarId = $calendarId;
- $this->calendarData = $calendarData;
}
/**
diff --git a/apps/dav/lib/Events/CalendarDeletedEvent.php b/apps/dav/lib/Events/CalendarDeletedEvent.php
index 326af0702ad..c8ab4265b27 100644
--- a/apps/dav/lib/Events/CalendarDeletedEvent.php
+++ b/apps/dav/lib/Events/CalendarDeletedEvent.php
@@ -18,15 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class CalendarDeletedEvent extends Event {
- /** @var int */
- private $calendarId;
-
- /** @var array */
- private $calendarData;
-
- /** @var array */
- private $shares;
-
/**
* CalendarDeletedEvent constructor.
*
@@ -35,13 +26,12 @@ class CalendarDeletedEvent extends Event {
* @param array $shares
* @since 20.0.0
*/
- public function __construct(int $calendarId,
- array $calendarData,
- array $shares) {
+ public function __construct(
+ private int $calendarId,
+ private array $calendarData,
+ private array $shares,
+ ) {
parent::__construct();
- $this->calendarId = $calendarId;
- $this->calendarData = $calendarData;
- $this->shares = $shares;
}
/**
diff --git a/apps/dav/lib/Events/CalendarMovedToTrashEvent.php b/apps/dav/lib/Events/CalendarMovedToTrashEvent.php
index b2eb8e1f018..8bb660a98c6 100644
--- a/apps/dav/lib/Events/CalendarMovedToTrashEvent.php
+++ b/apps/dav/lib/Events/CalendarMovedToTrashEvent.php
@@ -15,28 +15,18 @@ use OCP\EventDispatcher\Event;
*/
class CalendarMovedToTrashEvent extends Event {
- /** @var int */
- private $calendarId;
-
- /** @var array */
- private $calendarData;
-
- /** @var array */
- private $shares;
-
/**
* @param int $calendarId
* @param array $calendarData
* @param array $shares
* @since 22.0.0
*/
- public function __construct(int $calendarId,
- array $calendarData,
- array $shares) {
+ public function __construct(
+ private int $calendarId,
+ private array $calendarData,
+ private array $shares,
+ ) {
parent::__construct();
- $this->calendarId = $calendarId;
- $this->calendarData = $calendarData;
- $this->shares = $shares;
}
/**
diff --git a/apps/dav/lib/Events/CalendarObjectCreatedEvent.php b/apps/dav/lib/Events/CalendarObjectCreatedEvent.php
index 5531f9954e7..187ded2dcd4 100644
--- a/apps/dav/lib/Events/CalendarObjectCreatedEvent.php
+++ b/apps/dav/lib/Events/CalendarObjectCreatedEvent.php
@@ -18,18 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class CalendarObjectCreatedEvent extends Event {
- /** @var int */
- private $calendarId;
-
- /** @var array */
- private $calendarData;
-
- /** @var array */
- private $shares;
-
- /** @var array */
- private $objectData;
-
/**
* CalendarObjectCreatedEvent constructor.
*
@@ -39,15 +27,13 @@ class CalendarObjectCreatedEvent extends Event {
* @param array $objectData
* @since 20.0.0
*/
- public function __construct(int $calendarId,
- array $calendarData,
- array $shares,
- array $objectData) {
+ public function __construct(
+ private int $calendarId,
+ private array $calendarData,
+ private array $shares,
+ private array $objectData,
+ ) {
parent::__construct();
- $this->calendarId = $calendarId;
- $this->calendarData = $calendarData;
- $this->shares = $shares;
- $this->objectData = $objectData;
}
/**
diff --git a/apps/dav/lib/Events/CalendarObjectDeletedEvent.php b/apps/dav/lib/Events/CalendarObjectDeletedEvent.php
index f3a1441fbc2..9928080f99b 100644
--- a/apps/dav/lib/Events/CalendarObjectDeletedEvent.php
+++ b/apps/dav/lib/Events/CalendarObjectDeletedEvent.php
@@ -18,18 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class CalendarObjectDeletedEvent extends Event {
- /** @var int */
- private $calendarId;
-
- /** @var array */
- private $calendarData;
-
- /** @var array */
- private $shares;
-
- /** @var array */
- private $objectData;
-
/**
* CalendarObjectDeletedEvent constructor.
*
@@ -39,15 +27,13 @@ class CalendarObjectDeletedEvent extends Event {
* @param array $objectData
* @since 20.0.0
*/
- public function __construct(int $calendarId,
- array $calendarData,
- array $shares,
- array $objectData) {
+ public function __construct(
+ private int $calendarId,
+ private array $calendarData,
+ private array $shares,
+ private array $objectData,
+ ) {
parent::__construct();
- $this->calendarId = $calendarId;
- $this->calendarData = $calendarData;
- $this->shares = $shares;
- $this->objectData = $objectData;
}
/**
diff --git a/apps/dav/lib/Events/CalendarObjectMovedEvent.php b/apps/dav/lib/Events/CalendarObjectMovedEvent.php
index b3adfae20bd..0b57919ddc9 100644
--- a/apps/dav/lib/Events/CalendarObjectMovedEvent.php
+++ b/apps/dav/lib/Events/CalendarObjectMovedEvent.php
@@ -17,32 +17,19 @@ use OCP\EventDispatcher\Event;
* @since 25.0.0
*/
class CalendarObjectMovedEvent extends Event {
- private int $sourceCalendarId;
- private array $sourceCalendarData;
- private int $targetCalendarId;
- private array $targetCalendarData;
- private array $sourceShares;
- private array $targetShares;
- private array $objectData;
-
/**
* @since 25.0.0
*/
- public function __construct(int $sourceCalendarId,
- array $sourceCalendarData,
- int $targetCalendarId,
- array $targetCalendarData,
- array $sourceShares,
- array $targetShares,
- array $objectData) {
+ public function __construct(
+ private int $sourceCalendarId,
+ private array $sourceCalendarData,
+ private int $targetCalendarId,
+ private array $targetCalendarData,
+ private array $sourceShares,
+ private array $targetShares,
+ private array $objectData,
+ ) {
parent::__construct();
- $this->sourceCalendarId = $sourceCalendarId;
- $this->sourceCalendarData = $sourceCalendarData;
- $this->targetCalendarId = $targetCalendarId;
- $this->targetCalendarData = $targetCalendarData;
- $this->sourceShares = $sourceShares;
- $this->targetShares = $targetShares;
- $this->objectData = $objectData;
}
/**
diff --git a/apps/dav/lib/Events/CalendarObjectMovedToTrashEvent.php b/apps/dav/lib/Events/CalendarObjectMovedToTrashEvent.php
index f2ccd2731bc..a26aca4ff2b 100644
--- a/apps/dav/lib/Events/CalendarObjectMovedToTrashEvent.php
+++ b/apps/dav/lib/Events/CalendarObjectMovedToTrashEvent.php
@@ -15,18 +15,6 @@ use OCP\EventDispatcher\Event;
*/
class CalendarObjectMovedToTrashEvent extends Event {
- /** @var int */
- private $calendarId;
-
- /** @var array */
- private $calendarData;
-
- /** @var array */
- private $shares;
-
- /** @var array */
- private $objectData;
-
/**
* @param int $calendarId
* @param array $calendarData
@@ -34,15 +22,13 @@ class CalendarObjectMovedToTrashEvent extends Event {
* @param array $objectData
* @since 22.0.0
*/
- public function __construct(int $calendarId,
- array $calendarData,
- array $shares,
- array $objectData) {
+ public function __construct(
+ private int $calendarId,
+ private array $calendarData,
+ private array $shares,
+ private array $objectData,
+ ) {
parent::__construct();
- $this->calendarId = $calendarId;
- $this->calendarData = $calendarData;
- $this->shares = $shares;
- $this->objectData = $objectData;
}
/**
diff --git a/apps/dav/lib/Events/CalendarObjectRestoredEvent.php b/apps/dav/lib/Events/CalendarObjectRestoredEvent.php
index bfd64be72b5..99d752de466 100644
--- a/apps/dav/lib/Events/CalendarObjectRestoredEvent.php
+++ b/apps/dav/lib/Events/CalendarObjectRestoredEvent.php
@@ -15,18 +15,6 @@ use OCP\EventDispatcher\Event;
*/
class CalendarObjectRestoredEvent extends Event {
- /** @var int */
- private $calendarId;
-
- /** @var array */
- private $calendarData;
-
- /** @var array */
- private $shares;
-
- /** @var array */
- private $objectData;
-
/**
* @param int $calendarId
* @param array $calendarData
@@ -34,15 +22,13 @@ class CalendarObjectRestoredEvent extends Event {
* @param array $objectData
* @since 22.0.0
*/
- public function __construct(int $calendarId,
- array $calendarData,
- array $shares,
- array $objectData) {
+ public function __construct(
+ private int $calendarId,
+ private array $calendarData,
+ private array $shares,
+ private array $objectData,
+ ) {
parent::__construct();
- $this->calendarId = $calendarId;
- $this->calendarData = $calendarData;
- $this->shares = $shares;
- $this->objectData = $objectData;
}
/**
diff --git a/apps/dav/lib/Events/CalendarObjectUpdatedEvent.php b/apps/dav/lib/Events/CalendarObjectUpdatedEvent.php
index 2f15ce6b3f2..8c4b843609d 100644
--- a/apps/dav/lib/Events/CalendarObjectUpdatedEvent.php
+++ b/apps/dav/lib/Events/CalendarObjectUpdatedEvent.php
@@ -18,18 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class CalendarObjectUpdatedEvent extends Event {
- /** @var int */
- private $calendarId;
-
- /** @var array */
- private $calendarData;
-
- /** @var array */
- private $shares;
-
- /** @var array */
- private $objectData;
-
/**
* CalendarObjectUpdatedEvent constructor.
*
@@ -39,15 +27,13 @@ class CalendarObjectUpdatedEvent extends Event {
* @param array $objectData
* @since 20.0.0
*/
- public function __construct(int $calendarId,
- array $calendarData,
- array $shares,
- array $objectData) {
+ public function __construct(
+ private int $calendarId,
+ private array $calendarData,
+ private array $shares,
+ private array $objectData,
+ ) {
parent::__construct();
- $this->calendarId = $calendarId;
- $this->calendarData = $calendarData;
- $this->shares = $shares;
- $this->objectData = $objectData;
}
/**
diff --git a/apps/dav/lib/Events/CalendarPublishedEvent.php b/apps/dav/lib/Events/CalendarPublishedEvent.php
index 922781e3cb7..32fb1c36963 100644
--- a/apps/dav/lib/Events/CalendarPublishedEvent.php
+++ b/apps/dav/lib/Events/CalendarPublishedEvent.php
@@ -17,10 +17,6 @@ use OCP\EventDispatcher\Event;
* @since 20.0.0
*/
class CalendarPublishedEvent extends Event {
- private int $calendarId;
- private array $calendarData;
- private string $publicUri;
-
/**
* CalendarPublishedEvent constructor.
*
@@ -29,13 +25,12 @@ class CalendarPublishedEvent extends Event {
* @param string $publicUri
* @since 20.0.0
*/
- public function __construct(int $calendarId,
- array $calendarData,
- string $publicUri) {
+ public function __construct(
+ private int $calendarId,
+ private array $calendarData,
+ private string $publicUri,
+ ) {
parent::__construct();
- $this->calendarId = $calendarId;
- $this->calendarData = $calendarData;
- $this->publicUri = $publicUri;
}
/**
diff --git a/apps/dav/lib/Events/CalendarRestoredEvent.php b/apps/dav/lib/Events/CalendarRestoredEvent.php
index 5ea754ef200..f404771dea2 100644
--- a/apps/dav/lib/Events/CalendarRestoredEvent.php
+++ b/apps/dav/lib/Events/CalendarRestoredEvent.php
@@ -15,28 +15,18 @@ use OCP\EventDispatcher\Event;
*/
class CalendarRestoredEvent extends Event {
- /** @var int */
- private $calendarId;
-
- /** @var array */
- private $calendarData;
-
- /** @var array */
- private $shares;
-
/**
* @param int $calendarId
* @param array $calendarData
* @param array $shares
* @since 22.0.0
*/
- public function __construct(int $calendarId,
- array $calendarData,
- array $shares) {
+ public function __construct(
+ private int $calendarId,
+ private array $calendarData,
+ private array $shares,
+ ) {
parent::__construct();
- $this->calendarId = $calendarId;
- $this->calendarData = $calendarData;
- $this->shares = $shares;
}
/**
diff --git a/apps/dav/lib/Events/CalendarShareUpdatedEvent.php b/apps/dav/lib/Events/CalendarShareUpdatedEvent.php
index cdd1bc86cc0..762307b202f 100644
--- a/apps/dav/lib/Events/CalendarShareUpdatedEvent.php
+++ b/apps/dav/lib/Events/CalendarShareUpdatedEvent.php
@@ -19,20 +19,6 @@ use Sabre\CalDAV\Xml\Property\SupportedCalendarComponentSet;
* @since 20.0.0
*/
class CalendarShareUpdatedEvent extends Event {
- private int $calendarId;
-
- /** @var array{id: int, uri: string, '{http://calendarserver.org/ns/}getctag': string, '{http://sabredav.org/ns}sync-token': int, '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set': SupportedCalendarComponentSet, '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp': ScheduleCalendarTransp, '{urn:ietf:params:xml:ns:caldav}calendar-timezone': ?string } */
- private array $calendarData;
-
- /** @var list<array{href: string, commonName: string, status: int, readOnly: bool, '{http://owncloud.org/ns}principal': string, '{http://owncloud.org/ns}group-share': bool}> */
- private array $oldShares;
-
- /** @var list<array{href: string, commonName: string, readOnly: bool}> */
- private array $added;
-
- /** @var list<string> */
- private array $removed;
-
/**
* CalendarShareUpdatedEvent constructor.
*
@@ -43,17 +29,14 @@ class CalendarShareUpdatedEvent extends Event {
* @param list<string> $removed
* @since 20.0.0
*/
- public function __construct(int $calendarId,
- array $calendarData,
- array $oldShares,
- array $added,
- array $removed) {
+ public function __construct(
+ private int $calendarId,
+ private array $calendarData,
+ private array $oldShares,
+ private array $added,
+ private array $removed,
+ ) {
parent::__construct();
- $this->calendarId = $calendarId;
- $this->calendarData = $calendarData;
- $this->oldShares = $oldShares;
- $this->added = $added;
- $this->removed = $removed;
}
/**
diff --git a/apps/dav/lib/Events/CalendarUnpublishedEvent.php b/apps/dav/lib/Events/CalendarUnpublishedEvent.php
index 5f10f1e2c62..10d1712686d 100644
--- a/apps/dav/lib/Events/CalendarUnpublishedEvent.php
+++ b/apps/dav/lib/Events/CalendarUnpublishedEvent.php
@@ -17,9 +17,6 @@ use OCP\EventDispatcher\Event;
* @since 20.0.0
*/
class CalendarUnpublishedEvent extends Event {
- private int $calendarId;
- private array $calendarData;
-
/**
* CalendarUnpublishedEvent constructor.
*
@@ -27,11 +24,11 @@ class CalendarUnpublishedEvent extends Event {
* @param array $calendarData
* @since 20.0.0
*/
- public function __construct(int $calendarId,
- array $calendarData) {
+ public function __construct(
+ private int $calendarId,
+ private array $calendarData,
+ ) {
parent::__construct();
- $this->calendarId = $calendarId;
- $this->calendarData = $calendarData;
}
/**
diff --git a/apps/dav/lib/Events/CalendarUpdatedEvent.php b/apps/dav/lib/Events/CalendarUpdatedEvent.php
index 46964156b16..a603d3152f0 100644
--- a/apps/dav/lib/Events/CalendarUpdatedEvent.php
+++ b/apps/dav/lib/Events/CalendarUpdatedEvent.php
@@ -18,18 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class CalendarUpdatedEvent extends Event {
- /** @var int */
- private $calendarId;
-
- /** @var array */
- private $calendarData;
-
- /** @var array */
- private $shares;
-
- /** @var array */
- private $mutations;
-
/**
* CalendarUpdatedEvent constructor.
*
@@ -39,15 +27,13 @@ class CalendarUpdatedEvent extends Event {
* @param array $mutations
* @since 20.0.0
*/
- public function __construct(int $calendarId,
- array $calendarData,
- array $shares,
- array $mutations) {
+ public function __construct(
+ private int $calendarId,
+ private array $calendarData,
+ private array $shares,
+ private array $mutations,
+ ) {
parent::__construct();
- $this->calendarId = $calendarId;
- $this->calendarData = $calendarData;
- $this->shares = $shares;
- $this->mutations = $mutations;
}
/**
diff --git a/apps/dav/lib/Events/CardCreatedEvent.php b/apps/dav/lib/Events/CardCreatedEvent.php
index 3036451862b..5a66d73e707 100644
--- a/apps/dav/lib/Events/CardCreatedEvent.php
+++ b/apps/dav/lib/Events/CardCreatedEvent.php
@@ -18,18 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class CardCreatedEvent extends Event {
- /** @var int */
- private $addressBookId;
-
- /** @var array */
- private $addressBookData;
-
- /** @var array */
- private $shares;
-
- /** @var array */
- private $cardData;
-
/**
* CardCreatedEvent constructor.
*
@@ -39,15 +27,13 @@ class CardCreatedEvent extends Event {
* @param array $cardData
* @since 20.0.0
*/
- public function __construct(int $addressBookId,
- array $addressBookData,
- array $shares,
- array $cardData) {
+ public function __construct(
+ private int $addressBookId,
+ private array $addressBookData,
+ private array $shares,
+ private array $cardData,
+ ) {
parent::__construct();
- $this->addressBookId = $addressBookId;
- $this->addressBookData = $addressBookData;
- $this->shares = $shares;
- $this->cardData = $cardData;
}
/**
diff --git a/apps/dav/lib/Events/CardDeletedEvent.php b/apps/dav/lib/Events/CardDeletedEvent.php
index 8b2499f71e0..237ffa7d623 100644
--- a/apps/dav/lib/Events/CardDeletedEvent.php
+++ b/apps/dav/lib/Events/CardDeletedEvent.php
@@ -18,18 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class CardDeletedEvent extends Event {
- /** @var int */
- private $addressBookId;
-
- /** @var array */
- private $addressBookData;
-
- /** @var array */
- private $shares;
-
- /** @var array */
- private $cardData;
-
/**
* CardDeletedEvent constructor.
*
@@ -39,15 +27,13 @@ class CardDeletedEvent extends Event {
* @param array $cardData
* @since 20.0.0
*/
- public function __construct(int $addressBookId,
- array $addressBookData,
- array $shares,
- array $cardData) {
+ public function __construct(
+ private int $addressBookId,
+ private array $addressBookData,
+ private array $shares,
+ private array $cardData,
+ ) {
parent::__construct();
- $this->addressBookId = $addressBookId;
- $this->addressBookData = $addressBookData;
- $this->shares = $shares;
- $this->cardData = $cardData;
}
/**
diff --git a/apps/dav/lib/Events/CardMovedEvent.php b/apps/dav/lib/Events/CardMovedEvent.php
index adeb513c5d9..be69a046537 100644
--- a/apps/dav/lib/Events/CardMovedEvent.php
+++ b/apps/dav/lib/Events/CardMovedEvent.php
@@ -17,32 +17,19 @@ use OCP\EventDispatcher\Event;
* @since 27.0.0
*/
class CardMovedEvent extends Event {
- private int $sourceAddressBookId;
- private array $sourceAddressBookData;
- private int $targetAddressBookId;
- private array $targetAddressBookData;
- private array $sourceShares;
- private array $targetShares;
- private array $objectData;
-
/**
* @since 27.0.0
*/
- public function __construct(int $sourceAddressBookId,
- array $sourceAddressBookData,
- int $targetAddressBookId,
- array $targetAddressBookData,
- array $sourceShares,
- array $targetShares,
- array $objectData) {
+ public function __construct(
+ private int $sourceAddressBookId,
+ private array $sourceAddressBookData,
+ private int $targetAddressBookId,
+ private array $targetAddressBookData,
+ private array $sourceShares,
+ private array $targetShares,
+ private array $objectData,
+ ) {
parent::__construct();
- $this->sourceAddressBookId = $sourceAddressBookId;
- $this->sourceAddressBookData = $sourceAddressBookData;
- $this->targetAddressBookId = $targetAddressBookId;
- $this->targetAddressBookData = $targetAddressBookData;
- $this->sourceShares = $sourceShares;
- $this->targetShares = $targetShares;
- $this->objectData = $objectData;
}
/**
diff --git a/apps/dav/lib/Events/CardUpdatedEvent.php b/apps/dav/lib/Events/CardUpdatedEvent.php
index 3d97b5adf2e..10fc5b74594 100644
--- a/apps/dav/lib/Events/CardUpdatedEvent.php
+++ b/apps/dav/lib/Events/CardUpdatedEvent.php
@@ -18,18 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class CardUpdatedEvent extends Event {
- /** @var int */
- private $addressBookId;
-
- /** @var array */
- private $addressBookData;
-
- /** @var array */
- private $shares;
-
- /** @var array */
- private $cardData;
-
/**
* CardUpdatedEvent constructor.
*
@@ -39,15 +27,13 @@ class CardUpdatedEvent extends Event {
* @param array $cardData
* @since 20.0.0
*/
- public function __construct(int $addressBookId,
- array $addressBookData,
- array $shares,
- array $cardData) {
+ public function __construct(
+ private int $addressBookId,
+ private array $addressBookData,
+ private array $shares,
+ private array $cardData,
+ ) {
parent::__construct();
- $this->addressBookId = $addressBookId;
- $this->addressBookData = $addressBookData;
- $this->shares = $shares;
- $this->cardData = $cardData;
}
/**
diff --git a/apps/dav/lib/Events/SabrePluginAddEvent.php b/apps/dav/lib/Events/SabrePluginAddEvent.php
index 42ba7263e90..866fae2e224 100644
--- a/apps/dav/lib/Events/SabrePluginAddEvent.php
+++ b/apps/dav/lib/Events/SabrePluginAddEvent.php
@@ -19,15 +19,13 @@ use Sabre\DAV\Server;
*/
class SabrePluginAddEvent extends Event {
- /** @var Server */
- private $server;
-
/**
* @since 28.0.0
*/
- public function __construct(Server $server) {
+ public function __construct(
+ private Server $server,
+ ) {
parent::__construct();
- $this->server = $server;
}
/**
diff --git a/apps/dav/lib/Events/SabrePluginAuthInitEvent.php b/apps/dav/lib/Events/SabrePluginAuthInitEvent.php
index 1709756368d..d3d93770c74 100644
--- a/apps/dav/lib/Events/SabrePluginAuthInitEvent.php
+++ b/apps/dav/lib/Events/SabrePluginAuthInitEvent.php
@@ -19,14 +19,12 @@ use Sabre\DAV\Server;
*/
class SabrePluginAuthInitEvent extends Event {
- /** @var Server */
- private $server;
-
/**
* @since 20.0.0
*/
- public function __construct(Server $server) {
- $this->server = $server;
+ public function __construct(
+ private Server $server,
+ ) {
}
/**
diff --git a/apps/dav/lib/Events/SubscriptionCreatedEvent.php b/apps/dav/lib/Events/SubscriptionCreatedEvent.php
index b96477582ad..433b6db59b0 100644
--- a/apps/dav/lib/Events/SubscriptionCreatedEvent.php
+++ b/apps/dav/lib/Events/SubscriptionCreatedEvent.php
@@ -18,12 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class SubscriptionCreatedEvent extends Event {
- /** @var int */
- private $subscriptionId;
-
- /** @var array */
- private $subscriptionData;
-
/**
* SubscriptionCreatedEvent constructor.
*
@@ -31,11 +25,11 @@ class SubscriptionCreatedEvent extends Event {
* @param array $subscriptionData
* @since 20.0.0
*/
- public function __construct(int $subscriptionId,
- array $subscriptionData) {
+ public function __construct(
+ private int $subscriptionId,
+ private array $subscriptionData,
+ ) {
parent::__construct();
- $this->subscriptionId = $subscriptionId;
- $this->subscriptionData = $subscriptionData;
}
/**
diff --git a/apps/dav/lib/Events/SubscriptionDeletedEvent.php b/apps/dav/lib/Events/SubscriptionDeletedEvent.php
index a99a72b125d..58d47ae98a4 100644
--- a/apps/dav/lib/Events/SubscriptionDeletedEvent.php
+++ b/apps/dav/lib/Events/SubscriptionDeletedEvent.php
@@ -18,15 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class SubscriptionDeletedEvent extends Event {
- /** @var int */
- private $subscriptionId;
-
- /** @var array */
- private $subscriptionData;
-
- /** @var array */
- private $shares;
-
/**
* SubscriptionDeletedEvent constructor.
*
@@ -35,13 +26,12 @@ class SubscriptionDeletedEvent extends Event {
* @param array $shares
* @since 20.0.0
*/
- public function __construct(int $subscriptionId,
- array $subscriptionData,
- array $shares) {
+ public function __construct(
+ private int $subscriptionId,
+ private array $subscriptionData,
+ private array $shares,
+ ) {
parent::__construct();
- $this->subscriptionId = $subscriptionId;
- $this->subscriptionData = $subscriptionData;
- $this->shares = $shares;
}
/**
diff --git a/apps/dav/lib/Events/SubscriptionUpdatedEvent.php b/apps/dav/lib/Events/SubscriptionUpdatedEvent.php
index 879b8ec1074..1a1b2804663 100644
--- a/apps/dav/lib/Events/SubscriptionUpdatedEvent.php
+++ b/apps/dav/lib/Events/SubscriptionUpdatedEvent.php
@@ -18,18 +18,6 @@ use OCP\EventDispatcher\Event;
*/
class SubscriptionUpdatedEvent extends Event {
- /** @var int */
- private $subscriptionId;
-
- /** @var array */
- private $subscriptionData;
-
- /** @var array */
- private $shares;
-
- /** @var array */
- private $mutations;
-
/**
* SubscriptionUpdatedEvent constructor.
*
@@ -39,15 +27,13 @@ class SubscriptionUpdatedEvent extends Event {
* @param array $mutations
* @since 20.0.0
*/
- public function __construct(int $subscriptionId,
- array $subscriptionData,
- array $shares,
- array $mutations) {
+ public function __construct(
+ private int $subscriptionId,
+ private array $subscriptionData,
+ private array $shares,
+ private array $mutations,
+ ) {
parent::__construct();
- $this->subscriptionId = $subscriptionId;
- $this->subscriptionData = $subscriptionData;
- $this->shares = $shares;
- $this->mutations = $mutations;
}
/**