aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/ITip
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/vobject/lib/ITip')
-rw-r--r--vendor/sabre/vobject/lib/ITip/Broker.php37
1 files changed, 25 insertions, 12 deletions
diff --git a/vendor/sabre/vobject/lib/ITip/Broker.php b/vendor/sabre/vobject/lib/ITip/Broker.php
index c09cdf3be..4f37b75d0 100644
--- a/vendor/sabre/vobject/lib/ITip/Broker.php
+++ b/vendor/sabre/vobject/lib/ITip/Broker.php
@@ -104,6 +104,7 @@ class Broker
*
* If the iTip message was not supported, we will always return false.
*
+ * @param Message $itipMessage
* @param VCalendar $existingObject
*
* @return VCalendar|null
@@ -262,6 +263,8 @@ class Broker
* This is message from an organizer, and is either a new event
* invite, or an update to an existing one.
*
+ *
+ * @param Message $itipMessage
* @param VCalendar $existingObject
*
* @return VCalendar|null
@@ -297,6 +300,7 @@ class Broker
* attendee got removed from an event, or an event got cancelled
* altogether.
*
+ * @param Message $itipMessage
* @param VCalendar $existingObject
*
* @return VCalendar|null
@@ -322,6 +326,7 @@ class Broker
* The message is a reply. This is for example an attendee telling
* an organizer he accepted the invite, or declined it.
*
+ * @param Message $itipMessage
* @param VCalendar $existingObject
*
* @return VCalendar|null
@@ -447,6 +452,10 @@ class Broker
* We will detect which attendees got added, which got removed and create
* specific messages for these situations.
*
+ * @param VCalendar $calendar
+ * @param array $eventInfo
+ * @param array $oldEventInfo
+ *
* @return array
*/
protected function parseEventForOrganizer(VCalendar $calendar, array $eventInfo, array $oldEventInfo)
@@ -496,21 +505,20 @@ class Broker
$message->recipient = $attendee['href'];
$message->recipientName = $attendee['name'];
- // Creating the new iCalendar body.
- $icalMsg = new VCalendar();
-
- foreach ($calendar->select('VTIMEZONE') as $timezone) {
- $icalMsg->add(clone $timezone);
- }
-
if (!$attendee['newInstances']) {
// If there are no instances the attendee is a part of, it
// means the attendee was removed and we need to send him a
// CANCEL.
$message->method = 'CANCEL';
+ // Creating the new iCalendar body.
+ $icalMsg = new VCalendar();
$icalMsg->METHOD = $message->method;
+ foreach ($calendar->select('VTIMEZONE') as $timezone) {
+ $icalMsg->add(clone $timezone);
+ }
+
$event = $icalMsg->add('VEVENT', [
'UID' => $message->uid,
'SEQUENCE' => $message->sequence,
@@ -537,8 +545,14 @@ class Broker
// The attendee gets the updated event body
$message->method = 'REQUEST';
+ // Creating the new iCalendar body.
+ $icalMsg = new VCalendar();
$icalMsg->METHOD = $message->method;
+ foreach ($calendar->select('VTIMEZONE') as $timezone) {
+ $icalMsg->add(clone $timezone);
+ }
+
// We need to find out that this change is significant. If it's
// not, systems may opt to not send messages.
//
@@ -611,7 +625,10 @@ class Broker
*
* This function figures out if we need to send a reply to an organizer.
*
- * @param string $attendee
+ * @param VCalendar $calendar
+ * @param array $eventInfo
+ * @param array $oldEventInfo
+ * @param string $attendee
*
* @return Message[]
*/
@@ -694,10 +711,6 @@ class Broker
$icalMsg = new VCalendar();
$icalMsg->METHOD = 'REPLY';
- foreach ($calendar->select('VTIMEZONE') as $timezone) {
- $icalMsg->add(clone $timezone);
- }
-
$hasReply = false;
foreach ($instances as $instance) {