aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CalDAV/Xml/Request/InviteReply.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/lib/CalDAV/Xml/Request/InviteReply.php')
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Xml/Request/InviteReply.php45
1 files changed, 21 insertions, 24 deletions
diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Request/InviteReply.php b/vendor/sabre/dav/lib/CalDAV/Xml/Request/InviteReply.php
index db32cc6a5..710095bb2 100644
--- a/vendor/sabre/dav/lib/CalDAV/Xml/Request/InviteReply.php
+++ b/vendor/sabre/dav/lib/CalDAV/Xml/Request/InviteReply.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV\Xml\Request;
use Sabre\CalDAV\Plugin;
@@ -11,7 +13,7 @@ use Sabre\Xml\Reader;
use Sabre\Xml\XmlDeserializable;
/**
- * Invite-reply POST request parser
+ * Invite-reply POST request parser.
*
* This class parses the invite-reply POST request, as defined in:
*
@@ -21,8 +23,8 @@ use Sabre\Xml\XmlDeserializable;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class InviteReply implements XmlDeserializable {
-
+class InviteReply implements XmlDeserializable
+{
/**
* The sharee calendar user address.
*
@@ -40,14 +42,14 @@ class InviteReply implements XmlDeserializable {
public $calendarUri;
/**
- * The id of the invite message that's being responded to
+ * The id of the invite message that's being responded to.
*
* @var string
*/
public $inReplyTo;
/**
- * An optional message
+ * An optional message.
*
* @var string
*/
@@ -61,22 +63,21 @@ class InviteReply implements XmlDeserializable {
public $status;
/**
- * Constructor
+ * Constructor.
*
* @param string $href
* @param string $calendarUri
* @param string $inReplyTo
* @param string $summary
- * @param int $status
+ * @param int $status
*/
- function __construct($href, $calendarUri, $inReplyTo, $summary, $status) {
-
+ public function __construct($href, $calendarUri, $inReplyTo, $summary, $status)
+ {
$this->href = $href;
$this->calendarUri = $calendarUri;
$this->inReplyTo = $inReplyTo;
$this->summary = $summary;
$this->status = $status;
-
}
/**
@@ -98,10 +99,11 @@ class InviteReply implements XmlDeserializable {
* the next element.
*
* @param Reader $reader
+ *
* @return mixed
*/
- static function xmlDeserialize(Reader $reader) {
-
+ public static function xmlDeserialize(Reader $reader)
+ {
$elems = KeyValue::xmlDeserialize($reader);
$href = null;
@@ -111,40 +113,35 @@ class InviteReply implements XmlDeserializable {
$status = null;
foreach ($elems as $name => $value) {
-
switch ($name) {
-
- case '{' . Plugin::NS_CALENDARSERVER . '}hosturl' :
+ case '{'.Plugin::NS_CALENDARSERVER.'}hosturl':
foreach ($value as $bla) {
- if ($bla['name'] === '{DAV:}href') {
+ if ('{DAV:}href' === $bla['name']) {
$calendarUri = $bla['value'];
}
}
break;
- case '{' . Plugin::NS_CALENDARSERVER . '}invite-accepted' :
+ case '{'.Plugin::NS_CALENDARSERVER.'}invite-accepted':
$status = DAV\Sharing\Plugin::INVITE_ACCEPTED;
break;
- case '{' . Plugin::NS_CALENDARSERVER . '}invite-declined' :
+ case '{'.Plugin::NS_CALENDARSERVER.'}invite-declined':
$status = DAV\Sharing\Plugin::INVITE_DECLINED;
break;
- case '{' . Plugin::NS_CALENDARSERVER . '}in-reply-to' :
+ case '{'.Plugin::NS_CALENDARSERVER.'}in-reply-to':
$inReplyTo = $value;
break;
- case '{' . Plugin::NS_CALENDARSERVER . '}summary' :
+ case '{'.Plugin::NS_CALENDARSERVER.'}summary':
$summary = $value;
break;
- case '{DAV:}href' :
+ case '{DAV:}href':
$href = $value;
break;
}
-
}
if (is_null($calendarUri)) {
throw new BadRequest('The {http://calendarserver.org/ns/}hosturl/{DAV:}href element must exist');
}
return new self($href, $calendarUri, $inReplyTo, $summary, $status);
-
}
-
}