aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CalDAV/Xml/Filter/ParamFilter.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/lib/CalDAV/Xml/Filter/ParamFilter.php')
-rw-r--r--vendor/sabre/dav/lib/CalDAV/Xml/Filter/ParamFilter.php37
1 files changed, 18 insertions, 19 deletions
diff --git a/vendor/sabre/dav/lib/CalDAV/Xml/Filter/ParamFilter.php b/vendor/sabre/dav/lib/CalDAV/Xml/Filter/ParamFilter.php
index bf422cf05..ec9ff753c 100644
--- a/vendor/sabre/dav/lib/CalDAV/Xml/Filter/ParamFilter.php
+++ b/vendor/sabre/dav/lib/CalDAV/Xml/Filter/ParamFilter.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV\Xml\Filter;
use Sabre\CalDAV\Plugin;
@@ -20,8 +22,8 @@ use Sabre\Xml\XmlDeserializable;
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class ParamFilter implements XmlDeserializable {
-
+class ParamFilter implements XmlDeserializable
+{
/**
* The deserialize method is called during xml parsing.
*
@@ -41,14 +43,15 @@ class ParamFilter implements XmlDeserializable {
* the next element.
*
* @param Reader $reader
+ *
* @return mixed
*/
- static function xmlDeserialize(Reader $reader) {
-
+ public static function xmlDeserialize(Reader $reader)
+ {
$result = [
- 'name' => null,
+ 'name' => null,
'is-not-defined' => false,
- 'text-match' => null,
+ 'text-match' => null,
];
$att = $reader->parseAttributes();
@@ -56,27 +59,23 @@ class ParamFilter implements XmlDeserializable {
$elems = $reader->parseInnerTree();
- if (is_array($elems)) foreach ($elems as $elem) {
-
- switch ($elem['name']) {
-
- case '{' . Plugin::NS_CALDAV . '}is-not-defined' :
+ if (is_array($elems)) {
+ foreach ($elems as $elem) {
+ switch ($elem['name']) {
+ case '{'.Plugin::NS_CALDAV.'}is-not-defined':
$result['is-not-defined'] = true;
break;
- case '{' . Plugin::NS_CALDAV . '}text-match' :
+ case '{'.Plugin::NS_CALDAV.'}text-match':
$result['text-match'] = [
- 'negate-condition' => isset($elem['attributes']['negate-condition']) && $elem['attributes']['negate-condition'] === 'yes',
- 'collation' => isset($elem['attributes']['collation']) ? $elem['attributes']['collation'] : 'i;ascii-casemap',
- 'value' => $elem['value'],
+ 'negate-condition' => isset($elem['attributes']['negate-condition']) && 'yes' === $elem['attributes']['negate-condition'],
+ 'collation' => isset($elem['attributes']['collation']) ? $elem['attributes']['collation'] : 'i;ascii-casemap',
+ 'value' => $elem['value'],
];
break;
-
}
-
+ }
}
return $result;
-
}
-
}