aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php')
-rw-r--r--vendor/sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php26
1 files changed, 12 insertions, 14 deletions
diff --git a/vendor/sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php b/vendor/sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php
index 830293a01..acf0039ce 100644
--- a/vendor/sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php
+++ b/vendor/sabre/dav/lib/DAV/Xml/Request/SyncCollectionReport.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Xml\Request;
use Sabre\DAV\Exception\BadRequest;
@@ -18,8 +20,8 @@ use Sabre\Xml\XmlDeserializable;
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class SyncCollectionReport implements XmlDeserializable {
-
+class SyncCollectionReport implements XmlDeserializable
+{
/**
* The sync-token the client supplied for the report.
*
@@ -44,7 +46,7 @@ class SyncCollectionReport implements XmlDeserializable {
/**
* The list of properties that are being requested for every change.
*
- * @var null|array
+ * @var array|null
*/
public $properties;
@@ -67,10 +69,11 @@ class SyncCollectionReport implements XmlDeserializable {
* the next element.
*
* @param Reader $reader
+ *
* @return mixed
*/
- static function xmlDeserialize(Reader $reader) {
-
+ public static function xmlDeserialize(Reader $reader)
+ {
$self = new self();
$reader->pushContext();
@@ -87,36 +90,31 @@ class SyncCollectionReport implements XmlDeserializable {
foreach ($required as $elem) {
if (!array_key_exists($elem, $elems)) {
- throw new BadRequest('The ' . $elem . ' element in the {DAV:}sync-collection report is required');
+ throw new BadRequest('The '.$elem.' element in the {DAV:}sync-collection report is required');
}
}
-
$self->properties = $elems['{DAV:}prop'];
$self->syncToken = $elems['{DAV:}sync-token'];
if (isset($elems['{DAV:}limit'])) {
$nresults = null;
foreach ($elems['{DAV:}limit'] as $child) {
- if ($child['name'] === '{DAV:}nresults') {
- $nresults = (int)$child['value'];
+ if ('{DAV:}nresults' === $child['name']) {
+ $nresults = (int) $child['value'];
}
}
$self->limit = $nresults;
}
if (isset($elems['{DAV:}sync-level'])) {
-
$value = $elems['{DAV:}sync-level'];
- if ($value === 'infinity') {
+ if ('infinity' === $value) {
$value = \Sabre\DAV\Server::DEPTH_INFINITY;
}
$self->syncLevel = $value;
-
}
return $self;
-
}
-
}