From 580c3f4ffe9608d2beb56d418c68b3b112420e76 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 10 Nov 2019 12:49:51 +0000 Subject: another bulk of composer updates (cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce) --- .../sabre/dav/lib/DAV/PropertyStorage/Plugin.php | 89 +++++++++++----------- 1 file changed, 44 insertions(+), 45 deletions(-) (limited to 'vendor/sabre/dav/lib/DAV/PropertyStorage/Plugin.php') diff --git a/vendor/sabre/dav/lib/DAV/PropertyStorage/Plugin.php b/vendor/sabre/dav/lib/DAV/PropertyStorage/Plugin.php index a66a14113..aa8610eb8 100644 --- a/vendor/sabre/dav/lib/DAV/PropertyStorage/Plugin.php +++ b/vendor/sabre/dav/lib/DAV/PropertyStorage/Plugin.php @@ -1,5 +1,7 @@ backend = $backend; - } /** @@ -62,15 +63,13 @@ class Plugin extends ServerPlugin { * This method should set up the required event subscriptions. * * @param Server $server - * @return void */ - function initialize(Server $server) { - - $server->on('propFind', [$this, 'propFind'], 130); - $server->on('propPatch', [$this, 'propPatch'], 300); - $server->on('afterMove', [$this, 'afterMove']); + public function initialize(Server $server) + { + $server->on('propFind', [$this, 'propFind'], 130); + $server->on('propPatch', [$this, 'propPatch'], 300); + $server->on('afterMove', [$this, 'afterMove']); $server->on('afterUnbind', [$this, 'afterUnbind']); - } /** @@ -80,34 +79,34 @@ class Plugin extends ServerPlugin { * plugin will look in the property storage backend to find them. * * @param PropFind $propFind - * @param INode $node - * @return void + * @param INode $node */ - function propFind(PropFind $propFind, INode $node) { - + public function propFind(PropFind $propFind, INode $node) + { $path = $propFind->getPath(); $pathFilter = $this->pathFilter; - if ($pathFilter && !$pathFilter($path)) return; + if ($pathFilter && !$pathFilter($path)) { + return; + } $this->backend->propFind($propFind->getPath(), $propFind); - } /** - * Called during PROPPATCH operations + * Called during PROPPATCH operations. * * If there's any updated properties that haven't been stored, the * propertystorage backend can handle it. * - * @param string $path + * @param string $path * @param PropPatch $propPatch - * @return void */ - function propPatch($path, PropPatch $propPatch) { - + public function propPatch($path, PropPatch $propPatch) + { $pathFilter = $this->pathFilter; - if ($pathFilter && !$pathFilter($path)) return; + if ($pathFilter && !$pathFilter($path)) { + return; + } $this->backend->propPatch($path, $propPatch); - } /** @@ -117,14 +116,14 @@ class Plugin extends ServerPlugin { * database. * * @param string $path - * @return void */ - function afterUnbind($path) { - + public function afterUnbind($path) + { $pathFilter = $this->pathFilter; - if ($pathFilter && !$pathFilter($path)) return; + if ($pathFilter && !$pathFilter($path)) { + return; + } $this->backend->delete($path); - } /** @@ -134,18 +133,20 @@ class Plugin extends ServerPlugin { * * @param string $source * @param string $destination - * @return void */ - function afterMove($source, $destination) { - + public function afterMove($source, $destination) + { $pathFilter = $this->pathFilter; - if ($pathFilter && !$pathFilter($source)) return; + if ($pathFilter && !$pathFilter($source)) { + return; + } // If the destination is filtered, afterUnbind will handle cleaning up // the properties. - if ($pathFilter && !$pathFilter($destination)) return; + if ($pathFilter && !$pathFilter($destination)) { + return; + } $this->backend->move($source, $destination); - } /** @@ -156,10 +157,9 @@ class Plugin extends ServerPlugin { * * @return string */ - function getPluginName() { - + public function getPluginName() + { return 'property-storage'; - } /** @@ -173,13 +173,12 @@ class Plugin extends ServerPlugin { * * @return array */ - function getPluginInfo() { - + public function getPluginInfo() + { return [ - 'name' => $this->getPluginName(), + 'name' => $this->getPluginName(), 'description' => 'This plugin allows any arbitrary WebDAV property to be set on any resource.', - 'link' => 'http://sabre.io/dav/property-storage/', + 'link' => 'http://sabre.io/dav/property-storage/', ]; - } } -- cgit v1.2.3