diff options
author | dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> | 2021-01-12 09:15:48 +0000 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-02-18 13:31:24 +0100 |
commit | eb502c02ff7693bb36318d857985f79e7bac370c (patch) | |
tree | 61a7a10839f0c3a19bf8af869af267c484b51e02 /apps/dav/lib/Connector | |
parent | d79cc8ea6ddc6f562ed0eeffc13cdbedf5df81bb (diff) | |
download | nextcloud-server-eb502c02ff7693bb36318d857985f79e7bac370c.tar.gz nextcloud-server-eb502c02ff7693bb36318d857985f79e7bac370c.zip |
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/nextcloud/coding-standard/releases)
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/lib/Connector')
-rw-r--r-- | apps/dav/lib/Connector/LegacyDAVACL.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/File.php | 20 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/FilesPlugin.php | 6 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Node.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/ObjectTree.php | 6 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Principal.php | 8 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/QuotaPlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/SharesPlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/TagsPlugin.php | 4 |
9 files changed, 27 insertions, 27 deletions
diff --git a/apps/dav/lib/Connector/LegacyDAVACL.php b/apps/dav/lib/Connector/LegacyDAVACL.php index 908c6265bf6..fd74daaeca1 100644 --- a/apps/dav/lib/Connector/LegacyDAVACL.php +++ b/apps/dav/lib/Connector/LegacyDAVACL.php @@ -54,7 +54,7 @@ class LegacyDAVACL extends DavAclPlugin { } private function convertPrincipal($principal, $toV2) { - list(, $name) = \Sabre\Uri\split($principal); + [, $name] = \Sabre\Uri\split($principal); if ($toV2) { return "principals/users/$name"; } diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index a4948a795a1..c6213cdbc81 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -144,7 +144,7 @@ class File extends Node implements IFile { } /** @var Storage $partStorage */ - list($partStorage) = $this->fileView->resolvePath($this->path); + [$partStorage] = $this->fileView->resolvePath($this->path); $needsPartFile = $partStorage->needsPartFile() && (strlen($this->path) > 1); $view = \OC\Files\Filesystem::getView(); @@ -168,9 +168,9 @@ class File extends Node implements IFile { // the part file and target file might be on a different storage in case of a single file storage (e.g. single file share) /** @var \OC\Files\Storage\Storage $partStorage */ - list($partStorage, $internalPartPath) = $this->fileView->resolvePath($partFilePath); + [$partStorage, $internalPartPath] = $this->fileView->resolvePath($partFilePath); /** @var \OC\Files\Storage\Storage $storage */ - list($storage, $internalPath) = $this->fileView->resolvePath($this->path); + [$storage, $internalPath] = $this->fileView->resolvePath($this->path); try { if (!$needsPartFile) { $this->changeLock(ILockingProvider::LOCK_EXCLUSIVE); @@ -223,7 +223,7 @@ class File extends Node implements IFile { // because we have no clue about the cause we can only throw back a 500/Internal Server Error throw new Exception('Could not write file contents'); } - list($count, $result) = \OC_Helper::streamCopy($data, $target); + [$count, $result] = \OC_Helper::streamCopy($data, $target); fclose($target); } @@ -501,7 +501,7 @@ class File extends Node implements IFile { return []; } /** @var \OCP\Files\Storage $storage */ - list($storage, $internalPath) = $this->fileView->resolvePath($this->path); + [$storage, $internalPath] = $this->fileView->resolvePath($this->path); if (is_null($storage)) { return []; } @@ -518,7 +518,7 @@ class File extends Node implements IFile { * @throws ServiceUnavailable */ private function createFileChunked($data) { - list($path, $name) = \Sabre\Uri\split($this->path); + [$path, $name] = \Sabre\Uri\split($this->path); $info = \OC_FileChunking::decodeName($name); if (empty($info)) { @@ -541,13 +541,13 @@ class File extends Node implements IFile { if ($chunk_handler->isComplete()) { /** @var Storage $storage */ - list($storage,) = $this->fileView->resolvePath($path); + [$storage,] = $this->fileView->resolvePath($path); $needsPartFile = $storage->needsPartFile(); $partFile = null; $targetPath = $path . '/' . $info['name']; /** @var \OC\Files\Storage\Storage $targetStorage */ - list($targetStorage, $targetInternalPath) = $this->fileView->resolvePath($targetPath); + [$targetStorage, $targetInternalPath] = $this->fileView->resolvePath($targetPath); $exists = $this->fileView->file_exists($targetPath); @@ -557,13 +557,13 @@ class File extends Node implements IFile { $this->emitPreHooks($exists, $targetPath); $this->fileView->changeLock($targetPath, ILockingProvider::LOCK_EXCLUSIVE); /** @var \OC\Files\Storage\Storage $targetStorage */ - list($targetStorage, $targetInternalPath) = $this->fileView->resolvePath($targetPath); + [$targetStorage, $targetInternalPath] = $this->fileView->resolvePath($targetPath); if ($needsPartFile) { // we first assembly the target file as a part file $partFile = $this->getPartFileBasePath($path . '/' . $info['name']) . '.ocTransferId' . $info['transferid'] . '.part'; /** @var \OC\Files\Storage\Storage $targetStorage */ - list($partStorage, $partInternalPath) = $this->fileView->resolvePath($partFile); + [$partStorage, $partInternalPath] = $this->fileView->resolvePath($partFile); $chunk_handler->file_assemble($partStorage, $partInternalPath); diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 476d049bbc3..fa948f38624 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -202,8 +202,8 @@ class FilesPlugin extends ServerPlugin { if (!$sourceNode instanceof Node) { return; } - list($sourceDir,) = \Sabre\Uri\split($source); - list($destinationDir,) = \Sabre\Uri\split($destination); + [$sourceDir,] = \Sabre\Uri\split($source); + [$destinationDir,] = \Sabre\Uri\split($destination); if ($sourceDir !== $destinationDir) { $sourceNodeFileInfo = $sourceNode->getFileInfo(); @@ -496,7 +496,7 @@ class FilesPlugin extends ServerPlugin { public function sendFileIdHeader($filePath, \Sabre\DAV\INode $node = null) { // chunked upload handling if (isset($_SERVER['HTTP_OC_CHUNKED'])) { - list($path, $name) = \Sabre\Uri\split($filePath); + [$path, $name] = \Sabre\Uri\split($filePath); $info = \OC_FileChunking::decodeName($name); if (!empty($info)) { $filePath = $path . '/' . $info['name']; diff --git a/apps/dav/lib/Connector/Sabre/Node.php b/apps/dav/lib/Connector/Sabre/Node.php index b83e5cbcbc1..b713d0d485b 100644 --- a/apps/dav/lib/Connector/Sabre/Node.php +++ b/apps/dav/lib/Connector/Sabre/Node.php @@ -131,8 +131,8 @@ abstract class Node implements \Sabre\DAV\INode { throw new \Sabre\DAV\Exception\Forbidden(); } - list($parentPath,) = \Sabre\Uri\split($this->path); - list(, $newName) = \Sabre\Uri\split($name); + [$parentPath,] = \Sabre\Uri\split($this->path); + [, $newName] = \Sabre\Uri\split($name); // verify path of the target $this->verifyPath(); diff --git a/apps/dav/lib/Connector/Sabre/ObjectTree.php b/apps/dav/lib/Connector/Sabre/ObjectTree.php index 3a6e355805a..5e4f757492d 100644 --- a/apps/dav/lib/Connector/Sabre/ObjectTree.php +++ b/apps/dav/lib/Connector/Sabre/ObjectTree.php @@ -80,7 +80,7 @@ class ObjectTree extends CachingTree { private function resolveChunkFile($path) { if (isset($_SERVER['HTTP_OC_CHUNKED'])) { // resolve to real file name to find the proper node - list($dir, $name) = \Sabre\Uri\split($path); + [$dir, $name] = \Sabre\Uri\split($path); if ($dir === '/' || $dir === '.') { $dir = ''; } @@ -220,7 +220,7 @@ class ObjectTree extends CachingTree { // this will trigger existence check $this->getNodeForPath($sourcePath); - list($destinationDir, $destinationName) = \Sabre\Uri\split($destinationPath); + [$destinationDir, $destinationName] = \Sabre\Uri\split($destinationPath); try { $this->fileView->verifyPath($destinationDir, $destinationName); } catch (\OCP\Files\InvalidPathException $ex) { @@ -237,7 +237,7 @@ class ObjectTree extends CachingTree { throw new FileLocked($e->getMessage(), $e->getCode(), $e); } - list($destinationDir,) = \Sabre\Uri\split($destinationPath); + [$destinationDir,] = \Sabre\Uri\split($destinationPath); $this->markDirty($destinationDir); } } diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php index c1b1dc1b2d1..2351094a917 100644 --- a/apps/dav/lib/Connector/Sabre/Principal.php +++ b/apps/dav/lib/Connector/Sabre/Principal.php @@ -154,11 +154,11 @@ class Principal implements BackendInterface { * @return array */ public function getPrincipalByPath($path) { - list($prefix, $name) = \Sabre\Uri\split($path); + [$prefix, $name] = \Sabre\Uri\split($path); $decodedName = urldecode($name); if ($name === 'calendar-proxy-write' || $name === 'calendar-proxy-read') { - list($prefix2, $name2) = \Sabre\Uri\split($prefix); + [$prefix2, $name2] = \Sabre\Uri\split($prefix); if ($prefix2 === $this->principalPrefix) { $user = $this->userManager->get($name2); @@ -213,7 +213,7 @@ class Principal implements BackendInterface { * @throws Exception */ public function getGroupMembership($principal, $needGroups = false) { - list($prefix, $name) = \Sabre\Uri\split($principal); + [$prefix, $name] = \Sabre\Uri\split($principal); if ($prefix !== $this->principalPrefix) { return []; @@ -532,7 +532,7 @@ class Principal implements BackendInterface { return []; } - list($prefix, $name) = \Sabre\Uri\split($principal); + [$prefix, $name] = \Sabre\Uri\split($principal); if ($this->hasCircles && $prefix === $this->principalPrefix) { $user = $this->userManager->get($name); if (!$user) { diff --git a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php index 6d17704b103..b71dcd72918 100644 --- a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php +++ b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php @@ -152,7 +152,7 @@ class QuotaPlugin extends \Sabre\DAV\ServerPlugin { } if ($length) { - list($parentPath, $newName) = \Sabre\Uri\split($path); + [$parentPath, $newName] = \Sabre\Uri\split($path); if (is_null($parentPath)) { $parentPath = ''; } diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php index 98458ff8bfa..121d1c39ff0 100644 --- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php @@ -151,7 +151,7 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin { if (isset($this->cachedShares[$sabreNode->getId()])) { $shares = $this->cachedShares[$sabreNode->getId()]; } else { - list($parentPath,) = \Sabre\Uri\split($sabreNode->getPath()); + [$parentPath,] = \Sabre\Uri\split($sabreNode->getPath()); if ($parentPath === '') { $parentPath = '/'; } diff --git a/apps/dav/lib/Connector/Sabre/TagsPlugin.php b/apps/dav/lib/Connector/Sabre/TagsPlugin.php index 240010eff48..a2601f5768a 100644 --- a/apps/dav/lib/Connector/Sabre/TagsPlugin.php +++ b/apps/dav/lib/Connector/Sabre/TagsPlugin.php @@ -245,13 +245,13 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin { $isFav = null; $propFind->handle(self::TAGS_PROPERTYNAME, function () use (&$isFav, $node) { - list($tags, $isFav) = $this->getTagsAndFav($node->getId()); + [$tags, $isFav] = $this->getTagsAndFav($node->getId()); return new TagList($tags); }); $propFind->handle(self::FAVORITE_PROPERTYNAME, function () use ($isFav, $node) { if (is_null($isFav)) { - list(, $isFav) = $this->getTagsAndFav($node->getId()); + [, $isFav] = $this->getTagsAndFav($node->getId()); } if ($isFav) { return 1; |