aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php')
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php23
1 files changed, 11 insertions, 12 deletions
diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php b/vendor/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php
index 9669be304..0d53aeda3 100644
--- a/vendor/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php
+++ b/vendor/sabre/dav/lib/CalDAV/Xml/Filter/CalendarData.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV\Xml\Filter;
use Sabre\CalDAV\Plugin;
@@ -25,8 +27,8 @@ use Sabre\Xml\XmlDeserializable;
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class CalendarData implements XmlDeserializable {
-
+class CalendarData implements XmlDeserializable
+{
/**
* The deserialize method is called during xml parsing.
*
@@ -46,24 +48,24 @@ class CalendarData implements XmlDeserializable {
* the next element.
*
* @param Reader $reader
+ *
* @return mixed
*/
- static function xmlDeserialize(Reader $reader) {
-
+ public static function xmlDeserialize(Reader $reader)
+ {
$result = [
'contentType' => $reader->getAttribute('content-type') ?: 'text/calendar',
- 'version' => $reader->getAttribute('version') ?: '2.0',
+ 'version' => $reader->getAttribute('version') ?: '2.0',
];
- $elems = (array)$reader->parseInnerTree();
+ $elems = (array) $reader->parseInnerTree();
foreach ($elems as $elem) {
-
switch ($elem['name']) {
- case '{' . Plugin::NS_CALDAV . '}expand' :
+ case '{'.Plugin::NS_CALDAV.'}expand':
$result['expand'] = [
'start' => isset($elem['attributes']['start']) ? DateTimeParser::parseDateTime($elem['attributes']['start']) : null,
- 'end' => isset($elem['attributes']['end']) ? DateTimeParser::parseDateTime($elem['attributes']['end']) : null,
+ 'end' => isset($elem['attributes']['end']) ? DateTimeParser::parseDateTime($elem['attributes']['end']) : null,
];
if (!$result['expand']['start'] || !$result['expand']['end']) {
@@ -74,11 +76,8 @@ class CalendarData implements XmlDeserializable {
}
break;
}
-
}
return $result;
-
}
-
}