aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CalDAV/Xml/Request/Share.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-11-10 12:49:51 +0000
committerMario <mario@mariovavti.com>2019-11-10 14:10:03 +0100
commit580c3f4ffe9608d2beb56d418c68b3b112420e76 (patch)
tree82335d01179ac361d3f547a4b8e8c598d302e9f3 /vendor/sabre/dav/lib/CalDAV/Xml/Request/Share.php
parentd22766f458a8539a40a57f3946459a9be1f21cd6 (diff)
downloadvolse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.gz
volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.bz2
volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.zip
another bulk of composer updates
(cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce)
Diffstat (limited to 'vendor/sabre/dav/lib/CalDAV/Xml/Request/Share.php')
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Xml/Request/Share.php48
1 files changed, 23 insertions, 25 deletions
diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Request/Share.php b/vendor/sabre/dav/lib/CalDAV/Xml/Request/Share.php
index e0bd8e0af..60bd579d5 100644
--- a/vendor/sabre/dav/lib/CalDAV/Xml/Request/Share.php
+++ b/vendor/sabre/dav/lib/CalDAV/Xml/Request/Share.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV\Xml\Request;
use Sabre\CalDAV\Plugin;
@@ -8,7 +10,7 @@ use Sabre\Xml\Reader;
use Sabre\Xml\XmlDeserializable;
/**
- * Share POST request parser
+ * Share POST request parser.
*
* This class parses the share POST request, as defined in:
*
@@ -18,8 +20,8 @@ use Sabre\Xml\XmlDeserializable;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class Share implements XmlDeserializable {
-
+class Share implements XmlDeserializable
+{
/**
* The list of new people added or updated or removed from the share.
*
@@ -28,14 +30,13 @@ class Share implements XmlDeserializable {
public $sharees = [];
/**
- * Constructor
+ * Constructor.
*
* @param Sharee[] $sharees
*/
- function __construct(array $sharees) {
-
+ public function __construct(array $sharees)
+ {
$this->sharees = $sharees;
-
}
/**
@@ -57,55 +58,52 @@ class Share implements XmlDeserializable {
* the next element.
*
* @param Reader $reader
+ *
* @return mixed
*/
- static function xmlDeserialize(Reader $reader) {
-
+ public static function xmlDeserialize(Reader $reader)
+ {
$elems = $reader->parseGetElements([
- '{' . Plugin::NS_CALENDARSERVER . '}set' => 'Sabre\\Xml\\Element\\KeyValue',
- '{' . Plugin::NS_CALENDARSERVER . '}remove' => 'Sabre\\Xml\\Element\\KeyValue',
+ '{'.Plugin::NS_CALENDARSERVER.'}set' => 'Sabre\\Xml\\Element\\KeyValue',
+ '{'.Plugin::NS_CALENDARSERVER.'}remove' => 'Sabre\\Xml\\Element\\KeyValue',
]);
$sharees = [];
foreach ($elems as $elem) {
switch ($elem['name']) {
-
- case '{' . Plugin::NS_CALENDARSERVER . '}set' :
+ case '{'.Plugin::NS_CALENDARSERVER.'}set':
$sharee = $elem['value'];
- $sumElem = '{' . Plugin::NS_CALENDARSERVER . '}summary';
- $commonName = '{' . Plugin::NS_CALENDARSERVER . '}common-name';
+ $sumElem = '{'.Plugin::NS_CALENDARSERVER.'}summary';
+ $commonName = '{'.Plugin::NS_CALENDARSERVER.'}common-name';
$properties = [];
if (isset($sharee[$commonName])) {
$properties['{DAV:}displayname'] = $sharee[$commonName];
}
- $access = array_key_exists('{' . Plugin::NS_CALENDARSERVER . '}read-write', $sharee)
+ $access = array_key_exists('{'.Plugin::NS_CALENDARSERVER.'}read-write', $sharee)
? \Sabre\DAV\Sharing\Plugin::ACCESS_READWRITE
: \Sabre\DAV\Sharing\Plugin::ACCESS_READ;
$sharees[] = new Sharee([
- 'href' => $sharee['{DAV:}href'],
+ 'href' => $sharee['{DAV:}href'],
'properties' => $properties,
- 'access' => $access,
- 'comment' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null
+ 'access' => $access,
+ 'comment' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null,
]);
break;
- case '{' . Plugin::NS_CALENDARSERVER . '}remove' :
+ case '{'.Plugin::NS_CALENDARSERVER.'}remove':
$sharees[] = new Sharee([
- 'href' => $elem['value']['{DAV:}href'],
- 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_NOACCESS
+ 'href' => $elem['value']['{DAV:}href'],
+ 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_NOACCESS,
]);
break;
-
}
}
return new self($sharees);
-
}
-
}