aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CalDAV/Xml/Property
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/Property
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/Property')
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Xml/Property/AllowedSharingModes.php32
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Xml/Property/EmailAddressSet.php33
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Xml/Property/Invite.php68
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php46
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarComponentSet.php39
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarData.php21
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Xml/Property/SupportedCollationSet.php19
7 files changed, 117 insertions, 141 deletions
diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Property/AllowedSharingModes.php b/vendor/sabre/dav/lib/CalDAV/Xml/Property/AllowedSharingModes.php
index 54e5a116a..224f52c96 100644
--- a/vendor/sabre/dav/lib/CalDAV/Xml/Property/AllowedSharingModes.php
+++ b/vendor/sabre/dav/lib/CalDAV/Xml/Property/AllowedSharingModes.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV\Xml\Property;
use Sabre\CalDAV\Plugin;
@@ -7,7 +9,7 @@ use Sabre\Xml\Writer;
use Sabre\Xml\XmlSerializable;
/**
- * AllowedSharingModes
+ * AllowedSharingModes.
*
* This property encodes the 'allowed-sharing-modes' property, as defined by
* the 'caldav-sharing-02' spec, in the http://calendarserver.org/ns/
@@ -18,14 +20,15 @@ use Sabre\Xml\XmlSerializable;
* such as VEVENT, VTODO
*
* @see https://trac.calendarserver.org/browser/CalendarServer/trunk/doc/Extensions/caldav-sharing-02.txt
+ *
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class AllowedSharingModes implements XmlSerializable {
-
+class AllowedSharingModes implements XmlSerializable
+{
/**
- * Whether or not a calendar can be shared with another user
+ * Whether or not a calendar can be shared with another user.
*
* @var bool
*/
@@ -39,17 +42,15 @@ class AllowedSharingModes implements XmlSerializable {
protected $canBePublished;
/**
- * Constructor
+ * Constructor.
*
* @param bool $canBeShared
* @param bool $canBePublished
- * @return void
*/
- function __construct($canBeShared, $canBePublished) {
-
+ public function __construct($canBeShared, $canBePublished)
+ {
$this->canBeShared = $canBeShared;
$this->canBePublished = $canBePublished;
-
}
/**
@@ -69,19 +70,14 @@ class AllowedSharingModes implements XmlSerializable {
* 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)
+ {
if ($this->canBeShared) {
- $writer->writeElement('{' . Plugin::NS_CALENDARSERVER . '}can-be-shared');
+ $writer->writeElement('{'.Plugin::NS_CALENDARSERVER.'}can-be-shared');
}
if ($this->canBePublished) {
- $writer->writeElement('{' . Plugin::NS_CALENDARSERVER . '}can-be-published');
+ $writer->writeElement('{'.Plugin::NS_CALENDARSERVER.'}can-be-published');
}
-
}
-
-
-
}
diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Property/EmailAddressSet.php b/vendor/sabre/dav/lib/CalDAV/Xml/Property/EmailAddressSet.php
index fc6f1d505..6b28d5df2 100644
--- a/vendor/sabre/dav/lib/CalDAV/Xml/Property/EmailAddressSet.php
+++ b/vendor/sabre/dav/lib/CalDAV/Xml/Property/EmailAddressSet.php
@@ -1,12 +1,14 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV\Xml\Property;
use Sabre\Xml\Writer;
use Sabre\Xml\XmlSerializable;
/**
- * email-address-set property
+ * email-address-set property.
*
* This property represents the email-address-set property in the
* http://calendarserver.org/ns/ namespace.
@@ -17,35 +19,33 @@ use Sabre\Xml\XmlSerializable;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class EmailAddressSet implements XmlSerializable {
-
+class EmailAddressSet implements XmlSerializable
+{
/**
- * emails
+ * emails.
*
* @var array
*/
private $emails;
/**
- * __construct
+ * __construct.
*
* @param array $emails
*/
- function __construct(array $emails) {
-
+ public function __construct(array $emails)
+ {
$this->emails = $emails;
-
}
/**
- * Returns the email addresses
+ * Returns the email addresses.
*
* @return array
*/
- function getValue() {
-
+ public function getValue()
+ {
return $this->emails;
-
}
/**
@@ -65,16 +65,11 @@ class EmailAddressSet implements XmlSerializable {
* 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)
+ {
foreach ($this->emails as $email) {
-
$writer->writeElement('{http://calendarserver.org/ns/}email-address', $email);
-
}
-
}
-
}
diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Property/Invite.php b/vendor/sabre/dav/lib/CalDAV/Xml/Property/Invite.php
index 4f33c464c..db456617c 100644
--- a/vendor/sabre/dav/lib/CalDAV/Xml/Property/Invite.php
+++ b/vendor/sabre/dav/lib/CalDAV/Xml/Property/Invite.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV\Xml\Property;
use Sabre\CalDAV\Plugin;
@@ -9,19 +11,20 @@ use Sabre\Xml\Writer;
use Sabre\Xml\XmlSerializable;
/**
- * Invite property
+ * Invite property.
*
* This property encodes the 'invite' property, as defined by
* the 'caldav-sharing-02' spec, in the http://calendarserver.org/ns/
* namespace.
*
* @see https://trac.calendarserver.org/browser/CalendarServer/trunk/doc/Extensions/caldav-sharing-02.txt
+ *
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class Invite implements XmlSerializable {
-
+class Invite implements XmlSerializable
+{
/**
* The list of users a calendar has been shared to.
*
@@ -34,10 +37,9 @@ class Invite implements XmlSerializable {
*
* @param Sharee[] $sharees
*/
- function __construct(array $sharees) {
-
+ public function __construct(array $sharees)
+ {
$this->sharees = $sharees;
-
}
/**
@@ -45,10 +47,9 @@ class Invite implements XmlSerializable {
*
* @return array
*/
- function getValue() {
-
+ public function getValue()
+ {
return $this->sharees;
-
}
/**
@@ -68,61 +69,54 @@ class Invite implements XmlSerializable {
* If you are opening new elements, you must also close them again.
*
* @param Writer $writer
- * @return void
*/
- function xmlSerialize(Writer $writer) {
-
- $cs = '{' . Plugin::NS_CALENDARSERVER . '}';
+ public function xmlSerialize(Writer $writer)
+ {
+ $cs = '{'.Plugin::NS_CALENDARSERVER.'}';
foreach ($this->sharees as $sharee) {
-
- if ($sharee->access === DAV\Sharing\Plugin::ACCESS_SHAREDOWNER) {
- $writer->startElement($cs . 'organizer');
+ if (DAV\Sharing\Plugin::ACCESS_SHAREDOWNER === $sharee->access) {
+ $writer->startElement($cs.'organizer');
} else {
- $writer->startElement($cs . 'user');
+ $writer->startElement($cs.'user');
switch ($sharee->inviteStatus) {
- case DAV\Sharing\Plugin::INVITE_ACCEPTED :
- $writer->writeElement($cs . 'invite-accepted');
+ case DAV\Sharing\Plugin::INVITE_ACCEPTED:
+ $writer->writeElement($cs.'invite-accepted');
break;
- case DAV\Sharing\Plugin::INVITE_DECLINED :
- $writer->writeElement($cs . 'invite-declined');
+ case DAV\Sharing\Plugin::INVITE_DECLINED:
+ $writer->writeElement($cs.'invite-declined');
break;
- case DAV\Sharing\Plugin::INVITE_NORESPONSE :
- $writer->writeElement($cs . 'invite-noresponse');
+ case DAV\Sharing\Plugin::INVITE_NORESPONSE:
+ $writer->writeElement($cs.'invite-noresponse');
break;
- case DAV\Sharing\Plugin::INVITE_INVALID :
- $writer->writeElement($cs . 'invite-invalid');
+ case DAV\Sharing\Plugin::INVITE_INVALID:
+ $writer->writeElement($cs.'invite-invalid');
break;
}
- $writer->startElement($cs . 'access');
+ $writer->startElement($cs.'access');
switch ($sharee->access) {
- case DAV\Sharing\Plugin::ACCESS_READWRITE :
- $writer->writeElement($cs . 'read-write');
+ case DAV\Sharing\Plugin::ACCESS_READWRITE:
+ $writer->writeElement($cs.'read-write');
break;
- case DAV\Sharing\Plugin::ACCESS_READ :
- $writer->writeElement($cs . 'read');
+ case DAV\Sharing\Plugin::ACCESS_READ:
+ $writer->writeElement($cs.'read');
break;
-
}
$writer->endElement(); // access
-
}
$href = new DAV\Xml\Property\Href($sharee->href);
$href->xmlSerialize($writer);
if (isset($sharee->properties['{DAV:}displayname'])) {
- $writer->writeElement($cs . 'common-name', $sharee->properties['{DAV:}displayname']);
+ $writer->writeElement($cs.'common-name', $sharee->properties['{DAV:}displayname']);
}
if ($sharee->comment) {
- $writer->writeElement($cs . 'summary', $sharee->comment);
+ $writer->writeElement($cs.'summary', $sharee->comment);
}
$writer->endElement(); // organizer or user
-
}
-
}
-
}
diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php b/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php
index 10c20be55..780907169 100644
--- a/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php
+++ b/vendor/sabre/dav/lib/CalDAV/Xml/Property/ScheduleCalendarTransp.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV\Xml\Property;
use Sabre\CalDAV\Plugin;
@@ -24,41 +26,39 @@ use Sabre\Xml\Writer;
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class ScheduleCalendarTransp implements Element {
-
+class ScheduleCalendarTransp implements Element
+{
const TRANSPARENT = 'transparent';
const OPAQUE = 'opaque';
/**
- * value
+ * value.
*
* @var string
*/
protected $value;
/**
- * Creates the property
+ * Creates the property.
*
* @param string $value
*/
- function __construct($value) {
-
- if ($value !== self::TRANSPARENT && $value !== self::OPAQUE) {
+ public function __construct($value)
+ {
+ if (self::TRANSPARENT !== $value && self::OPAQUE !== $value) {
throw new \InvalidArgumentException('The value must either be specified as "transparent" or "opaque"');
}
$this->value = $value;
-
}
/**
- * Returns the current value
+ * Returns the current value.
*
* @return string
*/
- function getValue() {
-
+ public function getValue()
+ {
return $this->value;
-
}
/**
@@ -78,19 +78,17 @@ class ScheduleCalendarTransp 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)
+ {
switch ($this->value) {
- case self::TRANSPARENT :
- $writer->writeElement('{' . Plugin::NS_CALDAV . '}transparent');
+ case self::TRANSPARENT:
+ $writer->writeElement('{'.Plugin::NS_CALDAV.'}transparent');
break;
- case self::OPAQUE :
- $writer->writeElement('{' . Plugin::NS_CALDAV . '}opaque');
+ case self::OPAQUE:
+ $writer->writeElement('{'.Plugin::NS_CALDAV.'}opaque');
break;
}
-
}
/**
@@ -112,10 +110,11 @@ class ScheduleCalendarTransp implements Element {
* the next element.
*
* @param Reader $reader
+ *
* @return mixed
*/
- static function xmlDeserialize(Reader $reader) {
-
+ public static function xmlDeserialize(Reader $reader)
+ {
$elems = Deserializer\enum($reader, Plugin::NS_CALDAV);
if (in_array('transparent', $elems)) {
@@ -123,8 +122,7 @@ class ScheduleCalendarTransp implements Element {
} else {
$value = self::OPAQUE;
}
- return new self($value);
+ return new self($value);
}
-
}
diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarComponentSet.php b/vendor/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarComponentSet.php
index 7fc25c5f0..56fa61b13 100644
--- a/vendor/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarComponentSet.php
+++ b/vendor/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarComponentSet.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV\Xml\Property;
use Sabre\CalDAV\Plugin;
@@ -21,8 +23,8 @@ use Sabre\Xml\Writer;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class SupportedCalendarComponentSet implements Element {
-
+class SupportedCalendarComponentSet implements Element
+{
/**
* List of supported components.
*
@@ -37,21 +39,19 @@ class SupportedCalendarComponentSet implements Element {
*
* @param array $components
*/
- function __construct(array $components) {
-
+ public function __construct(array $components)
+ {
$this->components = $components;
-
}
/**
- * Returns the list of supported components
+ * Returns the list of supported components.
*
* @return array
*/
- function getValue() {
-
+ public function getValue()
+ {
return $this->components;
-
}
/**
@@ -71,18 +71,14 @@ class SupportedCalendarComponentSet 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)
+ {
foreach ($this->components as $component) {
-
- $writer->startElement('{' . Plugin::NS_CALDAV . '}comp');
+ $writer->startElement('{'.Plugin::NS_CALDAV.'}comp');
$writer->writeAttributes(['name' => $component]);
$writer->endElement();
-
}
-
}
/**
@@ -104,16 +100,17 @@ class SupportedCalendarComponentSet implements Element {
* the next element.
*
* @param Reader $reader
+ *
* @return mixed
*/
- static function xmlDeserialize(Reader $reader) {
-
+ public static function xmlDeserialize(Reader $reader)
+ {
$elems = $reader->parseInnerTree();
$components = [];
- foreach ((array)$elems as $elem) {
- if ($elem['name'] === '{' . Plugin::NS_CALDAV . '}comp') {
+ foreach ((array) $elems as $elem) {
+ if ($elem['name'] === '{'.Plugin::NS_CALDAV.'}comp') {
$components[] = $elem['attributes']['name'];
}
}
@@ -123,7 +120,5 @@ class SupportedCalendarComponentSet implements Element {
}
return new self($components);
-
}
-
}
diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarData.php b/vendor/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarData.php
index d123ba4c0..1c9c4779f 100644
--- a/vendor/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarData.php
+++ b/vendor/sabre/dav/lib/CalDAV/Xml/Property/SupportedCalendarData.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV\Xml\Property;
use Sabre\CalDAV\Plugin;
@@ -7,7 +9,7 @@ use Sabre\Xml\Writer;
use Sabre\Xml\XmlSerializable;
/**
- * Supported-calendar-data property
+ * Supported-calendar-data property.
*
* This property is a representation of the supported-calendar-data property
* in the CalDAV namespace. SabreDAV only has support for text/calendar;2.0
@@ -20,8 +22,8 @@ use Sabre\Xml\XmlSerializable;
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class SupportedCalendarData implements XmlSerializable {
-
+class SupportedCalendarData implements XmlSerializable
+{
/**
* The xmlSerialize method is called during xml writing.
*
@@ -39,22 +41,19 @@ class SupportedCalendarData implements XmlSerializable {
* If you are opening new elements, you must also close them again.
*
* @param Writer $writer
- * @return void
*/
- function xmlSerialize(Writer $writer) {
-
- $writer->startElement('{' . Plugin::NS_CALDAV . '}calendar-data');
+ public function xmlSerialize(Writer $writer)
+ {
+ $writer->startElement('{'.Plugin::NS_CALDAV.'}calendar-data');
$writer->writeAttributes([
'content-type' => 'text/calendar',
- 'version' => '2.0',
+ 'version' => '2.0',
]);
$writer->endElement(); // calendar-data
- $writer->startElement('{' . Plugin::NS_CALDAV . '}calendar-data');
+ $writer->startElement('{'.Plugin::NS_CALDAV.'}calendar-data');
$writer->writeAttributes([
'content-type' => 'application/calendar+json',
]);
$writer->endElement(); // calendar-data
-
}
-
}
diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Property/SupportedCollationSet.php b/vendor/sabre/dav/lib/CalDAV/Xml/Property/SupportedCollationSet.php
index af10860d0..b88cd0d92 100644
--- a/vendor/sabre/dav/lib/CalDAV/Xml/Property/SupportedCollationSet.php
+++ b/vendor/sabre/dav/lib/CalDAV/Xml/Property/SupportedCollationSet.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV\Xml\Property;
use Sabre\CalDAV\Plugin;
@@ -7,7 +9,7 @@ use Sabre\Xml\Writer;
use Sabre\Xml\XmlSerializable;
/**
- * supported-collation-set property
+ * supported-collation-set property.
*
* This property is a representation of the supported-collation-set property
* in the CalDAV namespace.
@@ -19,8 +21,8 @@ use Sabre\Xml\XmlSerializable;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class SupportedCollationSet implements XmlSerializable {
-
+class SupportedCollationSet implements XmlSerializable
+{
/**
* The xmlSerialize method is called during xml writing.
*
@@ -38,20 +40,17 @@ class SupportedCollationSet implements XmlSerializable {
* 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)
+ {
$collations = [
'i;ascii-casemap',
'i;octet',
- 'i;unicode-casemap'
+ 'i;unicode-casemap',
];
foreach ($collations as $collation) {
- $writer->writeElement('{' . Plugin::NS_CALDAV . '}supported-collation', $collation);
+ $writer->writeElement('{'.Plugin::NS_CALDAV.'}supported-collation', $collation);
}
-
}
-
}