From 580c3f4ffe9608d2beb56d418c68b3b112420e76 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 10 Nov 2019 12:49:51 +0000 Subject: another bulk of composer updates (cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce) --- vendor/sabre/dav/lib/DAV/Xml/Element/Sharee.php | 42 +++++++++++-------------- 1 file changed, 19 insertions(+), 23 deletions(-) (limited to 'vendor/sabre/dav/lib/DAV/Xml/Element/Sharee.php') diff --git a/vendor/sabre/dav/lib/DAV/Xml/Element/Sharee.php b/vendor/sabre/dav/lib/DAV/Xml/Element/Sharee.php index e187bf11c..e0db3bf37 100644 --- a/vendor/sabre/dav/lib/DAV/Xml/Element/Sharee.php +++ b/vendor/sabre/dav/lib/DAV/Xml/Element/Sharee.php @@ -1,5 +1,7 @@ $v) { - if (property_exists($this, $k)) { $this->$k = $v; } else { - throw new \InvalidArgumentException('Unknown property: ' . $k); + throw new \InvalidArgumentException('Unknown property: '.$k); } - } - } /** @@ -116,31 +115,28 @@ class Sharee implements Element { * If you are opening new elements, you must also close them again. * * @param Writer $writer - * @return void */ - function xmlSerialize(Writer $writer) { - - + public function xmlSerialize(Writer $writer) + { $writer->write([ new Href($this->href), - '{DAV:}prop' => $this->properties, + '{DAV:}prop' => $this->properties, '{DAV:}share-access' => new ShareAccess($this->access), ]); switch ($this->inviteStatus) { - case Plugin::INVITE_NORESPONSE : + case Plugin::INVITE_NORESPONSE: $writer->writeElement('{DAV:}invite-noresponse'); break; - case Plugin::INVITE_ACCEPTED : + case Plugin::INVITE_ACCEPTED: $writer->writeElement('{DAV:}invite-accepted'); break; - case Plugin::INVITE_DECLINED : + case Plugin::INVITE_DECLINED: $writer->writeElement('{DAV:}invite-declined'); break; - case Plugin::INVITE_INVALID : + case Plugin::INVITE_INVALID: $writer->writeElement('{DAV:}invite-invalid'); break; } - } /** @@ -162,10 +158,11 @@ class Sharee implements Element { * the next element. * * @param Reader $reader + * * @return mixed */ - static function xmlDeserialize(Reader $reader) { - + public static function xmlDeserialize(Reader $reader) + { // Temporarily override configuration $reader->pushContext(); $reader->elementMap['{DAV:}share-access'] = 'Sabre\DAV\Xml\Property\ShareAccess'; @@ -192,8 +189,7 @@ class Sharee implements Element { throw new BadRequest('Every {DAV:}sharee must have a {DAV:}share-access child element'); } $sharee->access = $elems['share-access']->getValue(); - return $sharee; + return $sharee; } - } -- cgit v1.2.3