diff options
Diffstat (limited to 'lib/private/Files')
19 files changed, 10 insertions, 31 deletions
diff --git a/lib/private/Files/Cache/QuerySearchHelper.php b/lib/private/Files/Cache/QuerySearchHelper.php index 3529ede9746..eba2aac927b 100644 --- a/lib/private/Files/Cache/QuerySearchHelper.php +++ b/lib/private/Files/Cache/QuerySearchHelper.php @@ -38,7 +38,6 @@ use OCP\IDBConnection; use Psr\Log\LoggerInterface; class QuerySearchHelper { - /** @var IMimeTypeLoader */ private $mimetypeLoader; /** @var IDBConnection */ diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php index 7be9c750262..f7d1d105d83 100644 --- a/lib/private/Files/Cache/Scanner.php +++ b/lib/private/Files/Cache/Scanner.php @@ -142,7 +142,6 @@ class Scanner extends BasicEmitter implements IScanner { } // only proceed if $file is not a partial file, blacklist is handled by the storage if (!self::isPartialFile($file)) { - // acquire a lock if ($lock) { if ($this->storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) { @@ -164,7 +163,6 @@ class Scanner extends BasicEmitter implements IScanner { try { if ($data) { - // pre-emit only if it was a file. By that we avoid counting/treating folders as files if ($data['mimetype'] !== 'httpd/unix-directory') { $this->emit('\OC\Files\Cache\Scanner', 'scanFile', [$file, $this->storageId]); diff --git a/lib/private/Files/Cache/SearchBuilder.php b/lib/private/Files/Cache/SearchBuilder.php index 1a8c3637063..63dc4b9cd0e 100644 --- a/lib/private/Files/Cache/SearchBuilder.php +++ b/lib/private/Files/Cache/SearchBuilder.php @@ -111,7 +111,7 @@ class SearchBuilder { } else { throw new \InvalidArgumentException('Binary operators inside "not" is not supported'); } - // no break + // no break case ISearchBinaryOperator::OPERATOR_AND: return call_user_func_array([$expr, 'andX'], $this->searchOperatorArrayToDBExprArray($builder, $operator->getArguments())); case ISearchBinaryOperator::OPERATOR_OR: diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php index 6c763540847..64a6fc57b27 100644 --- a/lib/private/Files/Filesystem.php +++ b/lib/private/Files/Filesystem.php @@ -49,7 +49,6 @@ use OCP\IUserManager; use OCP\IUserSession; class Filesystem { - /** * @var Mount\Manager $mounts */ diff --git a/lib/private/Files/ObjectStore/AppdataPreviewObjectStoreStorage.php b/lib/private/Files/ObjectStore/AppdataPreviewObjectStoreStorage.php index 1e10c3ad593..2f6db935236 100644 --- a/lib/private/Files/ObjectStore/AppdataPreviewObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/AppdataPreviewObjectStoreStorage.php @@ -26,7 +26,6 @@ declare(strict_types=1); namespace OC\Files\ObjectStore; class AppdataPreviewObjectStoreStorage extends ObjectStoreStorage { - /** @var string */ private $internalId; diff --git a/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php b/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php index afc0ac96abc..824adcc1d0e 100644 --- a/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php @@ -28,7 +28,6 @@ namespace OC\Files\ObjectStore; use OC\User\User; class HomeObjectStoreStorage extends ObjectStoreStorage implements \OCP\Files\IHomeStorage { - /** * The home user storage requires a user object to create a unique storage id * @param array $params diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index 02b65bf37f7..d0c5bd14b38 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -342,7 +342,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common { } else { return false; } - // no break + // no break case 'w': case 'wb': case 'w+': diff --git a/lib/private/Files/SetupManager.php b/lib/private/Files/SetupManager.php index ec5cd59d960..979e4ce966a 100644 --- a/lib/private/Files/SetupManager.php +++ b/lib/private/Files/SetupManager.php @@ -191,10 +191,10 @@ class SetupManager { return new PermissionsMask([ 'storage' => $storage, 'mask' => Constants::PERMISSION_ALL & ~( - Constants::PERMISSION_UPDATE | - Constants::PERMISSION_CREATE | - Constants::PERMISSION_DELETE - ), + Constants::PERMISSION_UPDATE | + Constants::PERMISSION_CREATE | + Constants::PERMISSION_DELETE + ), ]); } return $storage; diff --git a/lib/private/Files/SimpleFS/SimpleFolder.php b/lib/private/Files/SimpleFS/SimpleFolder.php index 1f267119871..4d24aa138c1 100644 --- a/lib/private/Files/SimpleFS/SimpleFolder.php +++ b/lib/private/Files/SimpleFS/SimpleFolder.php @@ -32,7 +32,6 @@ use OCP\Files\SimpleFS\ISimpleFolder; use OCP\Files\SimpleFS\ISimpleFile; class SimpleFolder implements ISimpleFolder { - /** @var Folder */ private $folder; diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index a53ed5d1957..0c121feb11e 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -523,7 +523,6 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { * @throws InvalidPathException */ public function verifyPath($path, $fileName) { - // verify empty and dot files $trimmed = trim($fileName); if ($trimmed === '') { diff --git a/lib/private/Files/Storage/FailedStorage.php b/lib/private/Files/Storage/FailedStorage.php index 482cdc453af..d748b3410c3 100644 --- a/lib/private/Files/Storage/FailedStorage.php +++ b/lib/private/Files/Storage/FailedStorage.php @@ -34,7 +34,6 @@ use OCP\Lock\ILockingProvider; * Storage placeholder to represent a missing precondition, storage unavailable */ class FailedStorage extends Common { - /** @var \Exception */ protected $e; diff --git a/lib/private/Files/Storage/LocalTempFileTrait.php b/lib/private/Files/Storage/LocalTempFileTrait.php index 2a1338148f5..2ac0a74b692 100644 --- a/lib/private/Files/Storage/LocalTempFileTrait.php +++ b/lib/private/Files/Storage/LocalTempFileTrait.php @@ -35,7 +35,6 @@ namespace OC\Files\Storage; * in classes which extend it, e.g. $this->stat() . */ trait LocalTempFileTrait { - /** @var string[] */ protected $cachedFiles = []; diff --git a/lib/private/Files/Storage/Storage.php b/lib/private/Files/Storage/Storage.php index cc317de2669..0a2511de164 100644 --- a/lib/private/Files/Storage/Storage.php +++ b/lib/private/Files/Storage/Storage.php @@ -32,7 +32,6 @@ use OCP\Lock\ILockingProvider; * All paths passed to the storage are relative to the storage and should NOT have a leading slash. */ interface Storage extends \OCP\Files\Storage { - /** * get a cache instance for the storage * diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php index cb82e00845c..ed680f5045d 100644 --- a/lib/private/Files/Storage/Wrapper/Encoding.php +++ b/lib/private/Files/Storage/Wrapper/Encoding.php @@ -40,7 +40,6 @@ use OCP\ICache; * the actual given name and then try its NFD form. */ class Encoding extends Wrapper { - /** * @var ICache */ diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index 2f7123426d1..be0db3d414a 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -375,7 +375,6 @@ class Encryption extends Wrapper { * @throws ModuleDoesNotExistsException */ public function fopen($path, $mode) { - // check if the file is stored in the array cache, this means that we // copy a file over to the versions folder, in this case we don't want to // decrypt it @@ -685,7 +684,6 @@ class Encryption extends Wrapper { $preserveMtime = false, $isRename = false ) { - // TODO clean this up once the underlying moveFromStorage in OC\Files\Storage\Wrapper\Common is fixed: // - call $this->storage->copyFromStorage() instead of $this->copyBetweenStorage // - copy the file cache update from $this->copyBetweenStorage to this method @@ -766,7 +764,6 @@ class Encryption extends Wrapper { $preserveMtime, $isRename ) { - // for versions we have nothing to do, because versions should always use the // key from the original file. Just create a 1:1 copy and done if ($this->isVersion($targetInternalPath) || diff --git a/lib/private/Files/Stream/Encryption.php b/lib/private/Files/Stream/Encryption.php index 9cc8b238ee1..cebf7bafced 100644 --- a/lib/private/Files/Stream/Encryption.php +++ b/lib/private/Files/Stream/Encryption.php @@ -37,7 +37,6 @@ use function is_array; use function stream_context_create; class Encryption extends Wrapper { - /** @var \OC\Encryption\Util */ protected $util; @@ -375,7 +374,6 @@ class Encryption extends Wrapper { // only allow writes on seekable streams, or at the end of the encrypted stream if (!$this->readOnly && ($resultFseek || $positionInFile === $this->size)) { - // switch the writeFlag so flush() will write the block $this->writeFlag = true; $this->fileUpdated = true; @@ -392,7 +390,7 @@ class Encryption extends Wrapper { $length += $remainingLength; $data = ''; // if $data doesn't fit the current block, the fill the current block and reiterate - // after the block is filled, it is flushed and $data is updatedxxx + // after the block is filled, it is flushed and $data is updatedxxx } else { $this->cache = substr($this->cache, 0, $blockPosition) . substr($data, 0, $this->unencryptedBlockSize - $blockPosition); diff --git a/lib/private/Files/Type/Detection.php b/lib/private/Files/Type/Detection.php index 4cade024460..432bc4c4d6d 100644 --- a/lib/private/Files/Type/Detection.php +++ b/lib/private/Files/Type/Detection.php @@ -202,7 +202,6 @@ class Detection implements IMimeTypeDetector { // note: leading dot doesn't qualify as extension if (strpos($fileName, '.') > 0) { - // remove versioning extension: name.v1508946057 and transfer extension: name.ocTransferId2057600214.part $fileName = preg_replace('!((\.v\d+)|((\.ocTransferId\d+)?\.part))$!', '', $fileName); diff --git a/lib/private/Files/Type/Loader.php b/lib/private/Files/Type/Loader.php index 8193a3f7b03..bf5af36ec6e 100644 --- a/lib/private/Files/Type/Loader.php +++ b/lib/private/Files/Type/Loader.php @@ -33,7 +33,6 @@ use OCP\IDBConnection; * @package OC\Files\Type */ class Loader implements IMimeTypeLoader { - /** @var IDBConnection */ private $dbConnection; @@ -121,7 +120,7 @@ class Loader implements IMimeTypeLoader { ->from('mimetypes') ->where( $fetch->expr()->eq('mimetype', $fetch->createNamedParameter($mimetype) - )); + )); $result = $fetch->execute(); $row = $result->fetch(); diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 16a9381768b..8f073da9164 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -821,14 +821,14 @@ class View { } else { $result = false; } - // moving a file/folder within the same mount point + // moving a file/folder within the same mount point } elseif ($storage1 === $storage2) { if ($storage1) { $result = $storage1->rename($internalPath1, $internalPath2); } else { $result = false; } - // moving a file/folder between storages (from $storage1 to $storage2) + // moving a file/folder between storages (from $storage1 to $storage2) } else { $result = $storage2->moveFromStorage($storage1, $internalPath1, $internalPath2); } @@ -1047,7 +1047,6 @@ class View { public function fromTmpFile($tmpFile, $path) { $this->assertPathLength($path); if (Filesystem::isValidPath($path)) { - // Get directory that the file is going into $filePath = dirname($path); @@ -1803,7 +1802,6 @@ class View { * @return boolean */ private function targetIsNotShared(IStorage $targetStorage, string $targetInternalPath) { - // note: cannot use the view because the target is already locked $fileId = (int)$targetStorage->getCache()->getId($targetInternalPath); if ($fileId === -1) { |