diff options
Diffstat (limited to 'vendor/sabre/dav/lib/DAVACL/Xml/Request')
5 files changed, 50 insertions, 50 deletions
diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Request/AclPrincipalPropSetReport.php b/vendor/sabre/dav/lib/DAVACL/Xml/Request/AclPrincipalPropSetReport.php index 0aa2f29a5..17b37afab 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Request/AclPrincipalPropSetReport.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Request/AclPrincipalPropSetReport.php @@ -1,5 +1,7 @@ <?php +declare(strict_types=1); + namespace Sabre\DAVACL\Xml\Request; use Sabre\Xml\Deserializer; @@ -17,8 +19,8 @@ use Sabre\Xml\XmlDeserializable; * @author Evert Pot (https://evertpot.com/) * @license http://sabre.io/license/ Modified BSD License */ -class AclPrincipalPropSetReport implements XmlDeserializable { - +class AclPrincipalPropSetReport implements XmlDeserializable +{ public $properties = []; /** @@ -40,10 +42,11 @@ class AclPrincipalPropSetReport implements XmlDeserializable { * the next element. * * @param Reader $reader + * * @return mixed */ - static function xmlDeserialize(Reader $reader) { - + public static function xmlDeserialize(Reader $reader) + { $reader->pushContext(); $reader->elementMap['{DAV:}prop'] = 'Sabre\Xml\Deserializer\enum'; @@ -61,7 +64,5 @@ class AclPrincipalPropSetReport implements XmlDeserializable { } return $report; - } - } diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Request/ExpandPropertyReport.php b/vendor/sabre/dav/lib/DAVACL/Xml/Request/ExpandPropertyReport.php index a9938ba5b..393308cd2 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Request/ExpandPropertyReport.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Request/ExpandPropertyReport.php @@ -1,5 +1,7 @@ <?php +declare(strict_types=1); + namespace Sabre\DAVACL\Xml\Request; use Sabre\Xml\Reader; @@ -16,8 +18,8 @@ use Sabre\Xml\XmlDeserializable; * @author Evert Pot (http://evertpot.com/) * @license http://sabre.io/license/ Modified BSD License */ -class ExpandPropertyReport implements XmlDeserializable { - +class ExpandPropertyReport implements XmlDeserializable +{ /** * An array with requested properties. * @@ -51,17 +53,17 @@ class ExpandPropertyReport implements XmlDeserializable { * the next element. * * @param Reader $reader + * * @return mixed */ - static function xmlDeserialize(Reader $reader) { - + public static function xmlDeserialize(Reader $reader) + { $elems = $reader->parseInnerTree(); $obj = new self(); $obj->properties = self::traverse($elems); return $obj; - } /** @@ -69,15 +71,15 @@ class ExpandPropertyReport implements XmlDeserializable { * {DAV:}property elements. * * @param array $elems - * @return void + * + * @return array */ - private static function traverse($elems) { - + private static function traverse($elems) + { $result = []; foreach ($elems as $elem) { - - if ($elem['name'] !== '{DAV:}property') { + if ('{DAV:}property' !== $elem['name']) { continue; } @@ -85,7 +87,7 @@ class ExpandPropertyReport implements XmlDeserializable { $elem['attributes']['namespace'] : 'DAV:'; - $propName = '{' . $namespace . '}' . $elem['attributes']['name']; + $propName = '{'.$namespace.'}'.$elem['attributes']['name']; $value = null; if (is_array($elem['value'])) { @@ -93,11 +95,8 @@ class ExpandPropertyReport implements XmlDeserializable { } $result[$propName] = $value; - } return $result; - } - } diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalMatchReport.php b/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalMatchReport.php index 1be15ab2d..f868cc9df 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalMatchReport.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalMatchReport.php @@ -1,5 +1,7 @@ <?php +declare(strict_types=1); + namespace Sabre\DAVACL\Xml\Request; use Sabre\Xml\Deserializer; @@ -18,8 +20,8 @@ use Sabre\Xml\XmlDeserializable; * @author Evert Pot (http://evertpot.com/) * @license http://sabre.io/license/ Modified BSD License */ -class PrincipalMatchReport implements XmlDeserializable { - +class PrincipalMatchReport implements XmlDeserializable +{ /** * Report on a list of principals that match the current principal. */ @@ -31,7 +33,7 @@ class PrincipalMatchReport implements XmlDeserializable { const PRINCIPAL_PROPERTY = 2; /** - * Must be SELF or PRINCIPAL_PROPERTY + * Must be SELF or PRINCIPAL_PROPERTY. * * @var int */ @@ -71,10 +73,11 @@ class PrincipalMatchReport implements XmlDeserializable { * the next element. * * @param Reader $reader + * * @return mixed */ - static function xmlDeserialize(Reader $reader) { - + public static function xmlDeserialize(Reader $reader) + { $reader->pushContext(); $reader->elementMap['{DAV:}prop'] = 'Sabre\Xml\Deserializer\enum'; @@ -101,7 +104,5 @@ class PrincipalMatchReport implements XmlDeserializable { } return $principalMatch; - } - } diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php b/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php index b0cf0e408..26468fd21 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php @@ -1,5 +1,7 @@ <?php +declare(strict_types=1); + namespace Sabre\DAVACL\Xml\Request; use Sabre\DAV\Exception\BadRequest; @@ -18,8 +20,8 @@ use Sabre\Xml\XmlDeserializable; * @author Evert Pot (http://evertpot.com/) * @license http://sabre.io/license/ Modified BSD License */ -class PrincipalPropertySearchReport implements XmlDeserializable { - +class PrincipalPropertySearchReport implements XmlDeserializable +{ /** * The requested properties. * @@ -28,7 +30,7 @@ class PrincipalPropertySearchReport implements XmlDeserializable { public $properties; /** - * searchProperties + * searchProperties. * * @var array */ @@ -72,31 +74,30 @@ class PrincipalPropertySearchReport implements XmlDeserializable { * the next element. * * @param Reader $reader + * * @return mixed */ - static function xmlDeserialize(Reader $reader) { - + public static function xmlDeserialize(Reader $reader) + { $self = new self(); $foundSearchProp = false; $self->test = 'allof'; - if ($reader->getAttribute('test') === 'anyof') { + if ('anyof' === $reader->getAttribute('test')) { $self->test = 'anyof'; } $elemMap = [ '{DAV:}property-search' => 'Sabre\\Xml\\Element\\KeyValue', - '{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue', + '{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue', ]; - - foreach ($reader->parseInnerTree($elemMap) as $elem) { + foreach ($reader->parseInnerTree($elemMap) as $elem) { switch ($elem['name']) { - - case '{DAV:}prop' : + case '{DAV:}prop': $self->properties = array_keys($elem['value']); break; - case '{DAV:}property-search' : + case '{DAV:}property-search': $foundSearchProp = true; // This property has two sub-elements: // {DAV:}prop - The property to be searched on. This may @@ -109,19 +110,15 @@ class PrincipalPropertySearchReport implements XmlDeserializable { $self->searchProperties[$propName] = $elem['value']['{DAV:}match']; } break; - case '{DAV:}apply-to-principal-collection-set' : + case '{DAV:}apply-to-principal-collection-set': $self->applyToPrincipalCollectionSet = true; break; - } - } if (!$foundSearchProp) { throw new BadRequest('The {DAV:}principal-property-search report must contain at least 1 {DAV:}property-search element'); } return $self; - } - } diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalSearchPropertySetReport.php b/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalSearchPropertySetReport.php index 64d1f7f86..37bc2cfbf 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalSearchPropertySetReport.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalSearchPropertySetReport.php @@ -1,5 +1,7 @@ <?php +declare(strict_types=1); + namespace Sabre\DAVACL\Xml\Request; use Sabre\DAV\Exception\BadRequest; @@ -18,8 +20,8 @@ use Sabre\Xml\XmlDeserializable; * @author Evert Pot (http://evertpot.com/) * @license http://sabre.io/license/ Modified BSD License */ -class PrincipalSearchPropertySetReport implements XmlDeserializable { - +class PrincipalSearchPropertySetReport implements XmlDeserializable +{ /** * The deserialize method is called during xml parsing. * @@ -39,10 +41,11 @@ class PrincipalSearchPropertySetReport implements XmlDeserializable { * the next element. * * @param Reader $reader + * * @return mixed */ - static function xmlDeserialize(Reader $reader) { - + public static function xmlDeserialize(Reader $reader) + { if (!$reader->isEmptyElement) { throw new BadRequest('The {DAV:}principal-search-property-set element must be empty'); } @@ -51,8 +54,7 @@ class PrincipalSearchPropertySetReport implements XmlDeserializable { $reader->next(); $self = new self(); - return $self; + return $self; } - } |