summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Storage/Wrapper
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-07-19 19:44:10 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-08-01 08:20:16 +0200
commitdfd8125aeb4a95df20041890dcffd50ba2592fee (patch)
treec9c9aaf0b7c4e2244b0d5752576453080acddf7e /lib/private/Files/Storage/Wrapper
parent10414d2e7d9f5605057d7432e899829bc5ba1dcd (diff)
downloadnextcloud-server-dfd8125aeb4a95df20041890dcffd50ba2592fee.tar.gz
nextcloud-server-dfd8125aeb4a95df20041890dcffd50ba2592fee.zip
Replace wrong PHPDocs
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/Files/Storage/Wrapper')
-rw-r--r--lib/private/Files/Storage/Wrapper/Availability.php6
-rw-r--r--lib/private/Files/Storage/Wrapper/Encoding.php9
-rw-r--r--lib/private/Files/Storage/Wrapper/Encryption.php16
-rw-r--r--lib/private/Files/Storage/Wrapper/Jail.php9
-rw-r--r--lib/private/Files/Storage/Wrapper/Quota.php9
-rw-r--r--lib/private/Files/Storage/Wrapper/Wrapper.php9
6 files changed, 32 insertions, 26 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Availability.php b/lib/private/Files/Storage/Wrapper/Availability.php
index 2a44a3a17d5..1fd38b5d6b7 100644
--- a/lib/private/Files/Storage/Wrapper/Availability.php
+++ b/lib/private/Files/Storage/Wrapper/Availability.php
@@ -22,6 +22,8 @@
*/
namespace OC\Files\Storage\Wrapper;
+use OCP\Files\Storage\IStorage;
+
/**
* Availability checker for storages
*
@@ -432,7 +434,7 @@ class Availability extends Wrapper {
}
/** {@inheritdoc} */
- public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
$this->checkAvailability();
try {
return parent::copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
@@ -443,7 +445,7 @@ class Availability extends Wrapper {
}
/** {@inheritdoc} */
- public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
$this->checkAvailability();
try {
return parent::moveFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php
index 389da06f7b7..240a1f3e049 100644
--- a/lib/private/Files/Storage/Wrapper/Encoding.php
+++ b/lib/private/Files/Storage/Wrapper/Encoding.php
@@ -22,6 +22,7 @@
namespace OC\Files\Storage\Wrapper;
+use OCP\Files\Storage\IStorage;
use OCP\ICache;
use OC\Cache\CappedMemoryCache;
@@ -483,12 +484,12 @@ class Encoding extends Wrapper {
}
/**
- * @param \OCP\Files\Storage $sourceStorage
+ * @param IStorage $sourceStorage
* @param string $sourceInternalPath
* @param string $targetInternalPath
* @return bool
*/
- public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
if ($sourceStorage === $this) {
return $this->copy($sourceInternalPath, $this->findPathToUse($targetInternalPath));
}
@@ -501,12 +502,12 @@ class Encoding extends Wrapper {
}
/**
- * @param \OCP\Files\Storage $sourceStorage
+ * @param IStorage $sourceStorage
* @param string $sourceInternalPath
* @param string $targetInternalPath
* @return bool
*/
- public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
if ($sourceStorage === $this) {
$result = $this->rename($sourceInternalPath, $this->findPathToUse($targetInternalPath));
if ($result) {
diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php
index 793849914d7..e359e86319c 100644
--- a/lib/private/Files/Storage/Wrapper/Encryption.php
+++ b/lib/private/Files/Storage/Wrapper/Encryption.php
@@ -590,13 +590,13 @@ class Encryption extends Wrapper {
}
/**
- * @param Storage $sourceStorage
+ * @param Storage\IStorage $sourceStorage
* @param string $sourceInternalPath
* @param string $targetInternalPath
* @param bool $preserveMtime
* @return bool
*/
- public function moveFromStorage(Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = true) {
+ public function moveFromStorage(Storage\IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = true) {
if ($sourceStorage === $this) {
return $this->rename($sourceInternalPath, $targetInternalPath);
}
@@ -624,14 +624,14 @@ class Encryption extends Wrapper {
/**
- * @param Storage $sourceStorage
+ * @param Storage\IStorage $sourceStorage
* @param string $sourceInternalPath
* @param string $targetInternalPath
* @param bool $preserveMtime
* @param bool $isRename
* @return bool
*/
- public function copyFromStorage(Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false, $isRename = false) {
+ public function copyFromStorage(Storage\IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $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
@@ -645,12 +645,12 @@ class Encryption extends Wrapper {
/**
* Update the encrypted cache version in the database
*
- * @param Storage $sourceStorage
+ * @param Storage\IStorage $sourceStorage
* @param string $sourceInternalPath
* @param string $targetInternalPath
* @param bool $isRename
*/
- private function updateEncryptedVersion(Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $isRename) {
+ private function updateEncryptedVersion(Storage\IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $isRename) {
$isEncrypted = $this->encryptionManager->isEnabled() && $this->shouldEncrypt($targetInternalPath) ? 1 : 0;
$cacheInformation = [
'encrypted' => (bool)$isEncrypted,
@@ -682,7 +682,7 @@ class Encryption extends Wrapper {
/**
* copy file between two storages
*
- * @param Storage $sourceStorage
+ * @param Storage\IStorage $sourceStorage
* @param string $sourceInternalPath
* @param string $targetInternalPath
* @param bool $preserveMtime
@@ -690,7 +690,7 @@ class Encryption extends Wrapper {
* @return bool
* @throws \Exception
*/
- private function copyBetweenStorage(Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime, $isRename) {
+ private function copyBetweenStorage(Storage\IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $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
diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php
index 4fa2428c968..d30563341cb 100644
--- a/lib/private/Files/Storage/Wrapper/Jail.php
+++ b/lib/private/Files/Storage/Wrapper/Jail.php
@@ -26,6 +26,7 @@ namespace OC\Files\Storage\Wrapper;
use OC\Files\Cache\Wrapper\CacheJail;
use OC\Files\Cache\Wrapper\JailPropagator;
+use OCP\Files\Storage\IStorage;
use OCP\Lock\ILockingProvider;
/**
@@ -465,12 +466,12 @@ class Jail extends Wrapper {
}
/**
- * @param \OCP\Files\Storage $sourceStorage
+ * @param IStorage $sourceStorage
* @param string $sourceInternalPath
* @param string $targetInternalPath
* @return bool
*/
- public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
if ($sourceStorage === $this) {
return $this->copy($sourceInternalPath, $targetInternalPath);
}
@@ -478,12 +479,12 @@ class Jail extends Wrapper {
}
/**
- * @param \OCP\Files\Storage $sourceStorage
+ * @param IStorage $sourceStorage
* @param string $sourceInternalPath
* @param string $targetInternalPath
* @return bool
*/
- public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
if ($sourceStorage === $this) {
return $this->rename($sourceInternalPath, $targetInternalPath);
}
diff --git a/lib/private/Files/Storage/Wrapper/Quota.php b/lib/private/Files/Storage/Wrapper/Quota.php
index 7312ed61dcc..e89a8d08de7 100644
--- a/lib/private/Files/Storage/Wrapper/Quota.php
+++ b/lib/private/Files/Storage/Wrapper/Quota.php
@@ -27,6 +27,7 @@
namespace OC\Files\Storage\Wrapper;
use OCP\Files\Cache\ICacheEntry;
+use OCP\Files\Storage\IStorage;
class Quota extends Wrapper {
@@ -170,12 +171,12 @@ class Quota extends Wrapper {
}
/**
- * @param \OCP\Files\Storage $sourceStorage
+ * @param IStorage $sourceStorage
* @param string $sourceInternalPath
* @param string $targetInternalPath
* @return bool
*/
- public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
$free = $this->free_space('');
if ($free < 0 or $this->getSize($sourceInternalPath, $sourceStorage) < $free) {
return $this->storage->copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
@@ -185,12 +186,12 @@ class Quota extends Wrapper {
}
/**
- * @param \OCP\Files\Storage $sourceStorage
+ * @param IStorage $sourceStorage
* @param string $sourceInternalPath
* @param string $targetInternalPath
* @return bool
*/
- public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
$free = $this->free_space('');
if ($free < 0 or $this->getSize($sourceInternalPath, $sourceStorage) < $free) {
return $this->storage->moveFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
diff --git a/lib/private/Files/Storage/Wrapper/Wrapper.php b/lib/private/Files/Storage/Wrapper/Wrapper.php
index d7cd4b729db..847a714f7dd 100644
--- a/lib/private/Files/Storage/Wrapper/Wrapper.php
+++ b/lib/private/Files/Storage/Wrapper/Wrapper.php
@@ -28,6 +28,7 @@ namespace OC\Files\Storage\Wrapper;
use OCP\Files\InvalidPathException;
use OCP\Files\Storage\ILockingStorage;
+use OCP\Files\Storage\IStorage;
use OCP\Lock\ILockingProvider;
class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage {
@@ -542,12 +543,12 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage {
}
/**
- * @param \OCP\Files\Storage $sourceStorage
+ * @param IStorage $sourceStorage
* @param string $sourceInternalPath
* @param string $targetInternalPath
* @return bool
*/
- public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
if ($sourceStorage === $this) {
return $this->copy($sourceInternalPath, $targetInternalPath);
}
@@ -556,12 +557,12 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage {
}
/**
- * @param \OCP\Files\Storage $sourceStorage
+ * @param IStorage $sourceStorage
* @param string $sourceInternalPath
* @param string $targetInternalPath
* @return bool
*/
- public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
if ($sourceStorage === $this) {
return $this->rename($sourceInternalPath, $targetInternalPath);
}