diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-19 17:54:00 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-19 18:16:35 +0200 |
commit | fedf9c69d9c84fc0399badef39ed765de72c08f1 (patch) | |
tree | bfaae1e7efb907cb236769fada35a9cd05ebf29e /apps/dav/lib/Connector/Sabre/ObjectTree.php | |
parent | 60be722ee8781d9e94ecc66d62c0e5fcb7e3934e (diff) | |
download | nextcloud-server-fedf9c69d9c84fc0399badef39ed765de72c08f1.tar.gz nextcloud-server-fedf9c69d9c84fc0399badef39ed765de72c08f1.zip |
Use matching parameter names form interfaces and implementations
Found by Psalm 3.14.1
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/ObjectTree.php')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/ObjectTree.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/dav/lib/Connector/Sabre/ObjectTree.php b/apps/dav/lib/Connector/Sabre/ObjectTree.php index e292744cd2f..680c0e84fca 100644 --- a/apps/dav/lib/Connector/Sabre/ObjectTree.php +++ b/apps/dav/lib/Connector/Sabre/ObjectTree.php @@ -189,8 +189,8 @@ class ObjectTree extends CachingTree { * This method must work recursively and delete the destination * if it exists * - * @param string $source - * @param string $destination + * @param string $sourcePath + * @param string $destinationPath * @throws FileLocked * @throws Forbidden * @throws InvalidPath @@ -201,14 +201,14 @@ class ObjectTree extends CachingTree { * @throws \Sabre\DAV\Exception\ServiceUnavailable * @return void */ - public function copy($source, $destination) { + public function copy($sourcePath, $destinationPath) { if (!$this->fileView) { throw new \Sabre\DAV\Exception\ServiceUnavailable('filesystem not setup'); } - $info = $this->fileView->getFileInfo(dirname($destination)); - if ($this->fileView->file_exists($destination)) { + $info = $this->fileView->getFileInfo(dirname($destinationPath)); + if ($this->fileView->file_exists($destinationPath)) { $destinationPermission = $info && $info->isUpdateable(); } else { $destinationPermission = $info && $info->isCreatable(); @@ -218,9 +218,9 @@ class ObjectTree extends CachingTree { } // this will trigger existence check - $this->getNodeForPath($source); + $this->getNodeForPath($sourcePath); - list($destinationDir, $destinationName) = \Sabre\Uri\split($destination); + list($destinationDir, $destinationName) = \Sabre\Uri\split($destinationPath); try { $this->fileView->verifyPath($destinationDir, $destinationName); } catch (\OCP\Files\InvalidPathException $ex) { @@ -228,7 +228,7 @@ class ObjectTree extends CachingTree { } try { - $this->fileView->copy($source, $destination); + $this->fileView->copy($sourcePath, $destinationPath); } catch (StorageNotAvailableException $e) { throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage()); } catch (ForbiddenException $ex) { @@ -237,7 +237,7 @@ class ObjectTree extends CachingTree { throw new FileLocked($e->getMessage(), $e->getCode(), $e); } - list($destinationDir,) = \Sabre\Uri\split($destination); + list($destinationDir,) = \Sabre\Uri\split($destinationPath); $this->markDirty($destinationDir); } } |