aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-09-16 13:04:15 +0200
committerprovokateurin <kate@provokateurin.de>2024-09-17 10:20:38 +0200
commitd2d1e3284d69236ab3680ddbbe5c2cc6fc4811ee (patch)
tree3c04e8d2ec990de15d3a5153f4fce8151b82e637 /lib/private/Files
parentdc13f9cc1e3d8dce1c18d2c7920afe99b7bfa475 (diff)
downloadnextcloud-server-d2d1e3284d69236ab3680ddbbe5c2cc6fc4811ee.tar.gz
nextcloud-server-d2d1e3284d69236ab3680ddbbe5c2cc6fc4811ee.zip
fix(Storage): Fix method docs inheritancefix/storage/method-docs-inheritance
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'lib/private/Files')
-rw-r--r--lib/private/Files/ObjectStore/ObjectStoreStorage.php4
-rw-r--r--lib/private/Files/Storage/Common.php28
-rw-r--r--lib/private/Files/Storage/Home.php6
-rw-r--r--lib/private/Files/Storage/Local.php3
-rw-r--r--lib/private/Files/Storage/Storage.php38
-rw-r--r--lib/private/Files/Storage/Wrapper/Availability.php1
-rw-r--r--lib/private/Files/Storage/Wrapper/Encoding.php14
-rw-r--r--lib/private/Files/Storage/Wrapper/Jail.php30
-rw-r--r--lib/private/Files/Storage/Wrapper/PermissionsMask.php7
-rw-r--r--lib/private/Files/Storage/Wrapper/Wrapper.php40
10 files changed, 16 insertions, 155 deletions
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
index 663041ed92c..a01515ac894 100644
--- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php
+++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
@@ -129,10 +129,6 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
/**
* Object Stores use a NoopScanner because metadata is directly stored in
* the file cache and cannot really scan the filesystem. The storage passed in is not used anywhere.
- *
- * @param string $path
- * @param \OC\Files\Storage\Storage (optional) the storage to pass to the scanner
- * @return \OC\Files\ObjectStore\ObjectStoreScanner
*/
public function getScanner($path = '', $storage = null) {
if (!$storage) {
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index 181da79cebe..b6f14321f61 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -347,12 +347,6 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
return $this->watcher;
}
- /**
- * get a propagator instance for the cache
- *
- * @param \OC\Files\Storage\Storage $storage (optional) the storage to pass to the watcher
- * @return Propagator
- */
public function getPropagator($storage = null) {
if (!$storage) {
$storage = $this;
@@ -360,6 +354,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
if (!$storage->instanceOfStorage(self::class)) {
throw new \InvalidArgumentException('Storage is not of the correct class');
}
+ /** @var self $storage */
if (!isset($storage->propagator)) {
$config = \OC::$server->getSystemConfig();
$storage->propagator = new Propagator($storage, \OC::$server->getDatabaseConnection(), ['appdata_' . $config->getValue('instanceid')]);
@@ -649,9 +644,6 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
return $result;
}
- /**
- * @inheritdoc
- */
public function getMetaData($path) {
if (Filesystem::isFileBlacklisted($path)) {
throw new ForbiddenException('Invalid path: ' . $path, false);
@@ -682,12 +674,6 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
return $data;
}
- /**
- * @param string $path
- * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
- * @param \OCP\Lock\ILockingProvider $provider
- * @throws \OCP\Lock\LockedException
- */
public function acquireLock($path, $type, ILockingProvider $provider) {
$logger = $this->getLockLogger();
if ($logger) {
@@ -715,12 +701,6 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
}
}
- /**
- * @param string $path
- * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
- * @param \OCP\Lock\ILockingProvider $provider
- * @throws \OCP\Lock\LockedException
- */
public function releaseLock($path, $type, ILockingProvider $provider) {
$logger = $this->getLockLogger();
if ($logger) {
@@ -748,12 +728,6 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
}
}
- /**
- * @param string $path
- * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
- * @param \OCP\Lock\ILockingProvider $provider
- * @throws \OCP\Lock\LockedException
- */
public function changeLock($path, $type, ILockingProvider $provider) {
$logger = $this->getLockLogger();
if ($logger) {
diff --git a/lib/private/Files/Storage/Home.php b/lib/private/Files/Storage/Home.php
index f7151f4a005..fd1d287629f 100644
--- a/lib/private/Files/Storage/Home.php
+++ b/lib/private/Files/Storage/Home.php
@@ -56,12 +56,6 @@ class Home extends Local implements \OCP\Files\IHomeStorage {
return $this->cache;
}
- /**
- * get a propagator instance for the cache
- *
- * @param \OC\Files\Storage\Storage $storage (optional) the storage to pass to the watcher
- * @return \OC\Files\Cache\Propagator
- */
public function getPropagator($storage = null) {
if (!$storage) {
$storage = $this;
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index c550cf75bc6..5b1dcb623ba 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -164,9 +164,6 @@ class Local extends \OC\Files\Storage\Common {
return $statResult;
}
- /**
- * @inheritdoc
- */
public function getMetaData($path) {
try {
$stat = $this->stat($path);
diff --git a/lib/private/Files/Storage/Storage.php b/lib/private/Files/Storage/Storage.php
index aff914ee12a..d6d1d26c35a 100644
--- a/lib/private/Files/Storage/Storage.php
+++ b/lib/private/Files/Storage/Storage.php
@@ -8,6 +8,11 @@
namespace OC\Files\Storage;
+use OC\Files\Cache\Cache;
+use OC\Files\Cache\Propagator;
+use OC\Files\Cache\Scanner;
+use OC\Files\Cache\Updater;
+use OC\Files\Cache\Watcher;
use OCP\Files\Storage\ILockingStorage;
use OCP\Files\Storage\IStorage;
@@ -18,45 +23,32 @@ use OCP\Files\Storage\IStorage;
*/
interface Storage extends IStorage, ILockingStorage {
/**
- * get a cache instance for the storage
- *
- * @param string $path
- * @param \OC\Files\Storage\Storage|null (optional) the storage to pass to the cache
- * @return \OC\Files\Cache\Cache
+ * @inheritDoc
+ * @return Cache
*/
public function getCache($path = '', $storage = null);
/**
- * get a scanner instance for the storage
- *
- * @param string $path
- * @param \OC\Files\Storage\Storage (optional) the storage to pass to the scanner
- * @return \OC\Files\Cache\Scanner
+ * @inheritDoc
+ * @return Scanner
*/
public function getScanner($path = '', $storage = null);
/**
- * get a watcher instance for the cache
- *
- * @param string $path
- * @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
- * @return \OC\Files\Cache\Watcher
+ * @inheritDoc
+ * @return Watcher
*/
public function getWatcher($path = '', $storage = null);
/**
- * get a propagator instance for the cache
- *
- * @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
- * @return \OC\Files\Cache\Propagator
+ * @inheritDoc
+ * @return Propagator
*/
public function getPropagator($storage = null);
/**
- * get a updater instance for the cache
- *
- * @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
- * @return \OC\Files\Cache\Updater
+ * @inheritDoc
+ * @return Updater
*/
public function getUpdater($storage = null);
diff --git a/lib/private/Files/Storage/Wrapper/Availability.php b/lib/private/Files/Storage/Wrapper/Availability.php
index 0f1abada168..aaf0acdc74f 100644
--- a/lib/private/Files/Storage/Wrapper/Availability.php
+++ b/lib/private/Files/Storage/Wrapper/Availability.php
@@ -422,7 +422,6 @@ class Availability extends Wrapper {
}
}
- /** {@inheritdoc} */
public function getMetaData($path) {
$this->checkAvailability();
try {
diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php
index a696a3e4802..48c6c38c848 100644
--- a/lib/private/Files/Storage/Wrapper/Encoding.php
+++ b/lib/private/Files/Storage/Wrapper/Encoding.php
@@ -418,13 +418,6 @@ class Encoding extends Wrapper {
return $this->storage->hasUpdated($this->findPathToUse($path), $time);
}
- /**
- * get a cache instance for the storage
- *
- * @param string $path
- * @param \OC\Files\Storage\Storage (optional) the storage to pass to the cache
- * @return \OC\Files\Cache\Cache
- */
public function getCache($path = '', $storage = null) {
if (!$storage) {
$storage = $this;
@@ -432,13 +425,6 @@ class Encoding extends Wrapper {
return $this->storage->getCache($this->findPathToUse($path), $storage);
}
- /**
- * get a scanner instance for the storage
- *
- * @param string $path
- * @param \OC\Files\Storage\Storage (optional) the storage to pass to the scanner
- * @return \OC\Files\Cache\Scanner
- */
public function getScanner($path = '', $storage = null) {
if (!$storage) {
$storage = $this;
diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php
index 46b40b92244..e61ded4bc38 100644
--- a/lib/private/Files/Storage/Wrapper/Jail.php
+++ b/lib/private/Files/Storage/Wrapper/Jail.php
@@ -358,13 +358,6 @@ class Jail extends Wrapper {
return $this->getWrapperStorage()->hasUpdated($this->getUnjailedPath($path), $time);
}
- /**
- * get a cache instance for the storage
- *
- * @param string $path
- * @param \OC\Files\Storage\Storage|null (optional) the storage to pass to the cache
- * @return \OC\Files\Cache\Cache
- */
public function getCache($path = '', $storage = null) {
$sourceCache = $this->getWrapperStorage()->getCache($this->getUnjailedPath($path));
return new CacheJail($sourceCache, $this->rootPath);
@@ -374,13 +367,6 @@ class Jail extends Wrapper {
return $this->getWrapperStorage()->getOwner($this->getUnjailedPath($path));
}
- /**
- * get a watcher instance for the cache
- *
- * @param string $path
- * @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
- * @return \OC\Files\Cache\Watcher
- */
public function getWatcher($path = '', $storage = null) {
$sourceWatcher = $this->getWrapperStorage()->getWatcher($this->getUnjailedPath($path), $this->getWrapperStorage());
return new JailWatcher($sourceWatcher, $this->rootPath);
@@ -400,30 +386,14 @@ class Jail extends Wrapper {
return $this->getWrapperStorage()->getMetaData($this->getUnjailedPath($path));
}
- /**
- * @param string $path
- * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
- * @param \OCP\Lock\ILockingProvider $provider
- * @throws \OCP\Lock\LockedException
- */
public function acquireLock($path, $type, ILockingProvider $provider) {
$this->getWrapperStorage()->acquireLock($this->getUnjailedPath($path), $type, $provider);
}
- /**
- * @param string $path
- * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
- * @param \OCP\Lock\ILockingProvider $provider
- */
public function releaseLock($path, $type, ILockingProvider $provider) {
$this->getWrapperStorage()->releaseLock($this->getUnjailedPath($path), $type, $provider);
}
- /**
- * @param string $path
- * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
- * @param \OCP\Lock\ILockingProvider $provider
- */
public function changeLock($path, $type, ILockingProvider $provider) {
$this->getWrapperStorage()->changeLock($this->getUnjailedPath($path), $type, $provider);
}
diff --git a/lib/private/Files/Storage/Wrapper/PermissionsMask.php b/lib/private/Files/Storage/Wrapper/PermissionsMask.php
index c502de41a86..d6b745c0d31 100644
--- a/lib/private/Files/Storage/Wrapper/PermissionsMask.php
+++ b/lib/private/Files/Storage/Wrapper/PermissionsMask.php
@@ -101,13 +101,6 @@ class PermissionsMask extends Wrapper {
}
}
- /**
- * get a cache instance for the storage
- *
- * @param string $path
- * @param \OC\Files\Storage\Storage (optional) the storage to pass to the cache
- * @return \OC\Files\Cache\Cache
- */
public function getCache($path = '', $storage = null) {
if (!$storage) {
$storage = $this;
diff --git a/lib/private/Files/Storage/Wrapper/Wrapper.php b/lib/private/Files/Storage/Wrapper/Wrapper.php
index 2a6d04da849..93dcacdfb42 100644
--- a/lib/private/Files/Storage/Wrapper/Wrapper.php
+++ b/lib/private/Files/Storage/Wrapper/Wrapper.php
@@ -353,13 +353,6 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea
return $this->getWrapperStorage()->hasUpdated($path, $time);
}
- /**
- * get a cache instance for the storage
- *
- * @param string $path
- * @param \OC\Files\Storage\Storage|null (optional) the storage to pass to the cache
- * @return \OC\Files\Cache\Cache
- */
public function getCache($path = '', $storage = null) {
if (!$storage) {
$storage = $this;
@@ -367,13 +360,6 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea
return $this->getWrapperStorage()->getCache($path, $storage);
}
- /**
- * get a scanner instance for the storage
- *
- * @param string $path
- * @param \OC\Files\Storage\Storage (optional) the storage to pass to the scanner
- * @return \OC\Files\Cache\Scanner
- */
public function getScanner($path = '', $storage = null) {
if (!$storage) {
$storage = $this;
@@ -385,13 +371,6 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea
return $this->getWrapperStorage()->getOwner($path);
}
- /**
- * get a watcher instance for the cache
- *
- * @param string $path
- * @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
- * @return \OC\Files\Cache\Watcher
- */
public function getWatcher($path = '', $storage = null) {
if (!$storage) {
$storage = $this;
@@ -413,9 +392,6 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea
return $this->getWrapperStorage()->getUpdater($storage);
}
- /**
- * @return \OC\Files\Cache\Storage
- */
public function getStorageCache() {
return $this->getWrapperStorage()->getStorageCache();
}
@@ -564,34 +540,18 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea
return $this->getWrapperStorage()->getMetaData($path);
}
- /**
- * @param string $path
- * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
- * @param \OCP\Lock\ILockingProvider $provider
- * @throws \OCP\Lock\LockedException
- */
public function acquireLock($path, $type, ILockingProvider $provider) {
if ($this->getWrapperStorage()->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
$this->getWrapperStorage()->acquireLock($path, $type, $provider);
}
}
- /**
- * @param string $path
- * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
- * @param \OCP\Lock\ILockingProvider $provider
- */
public function releaseLock($path, $type, ILockingProvider $provider) {
if ($this->getWrapperStorage()->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
$this->getWrapperStorage()->releaseLock($path, $type, $provider);
}
}
- /**
- * @param string $path
- * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
- * @param \OCP\Lock\ILockingProvider $provider
- */
public function changeLock($path, $type, ILockingProvider $provider) {
if ($this->getWrapperStorage()->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
$this->getWrapperStorage()->changeLock($path, $type, $provider);