diff --git a/apps/files_sharing/lib/External/Storage.php b/apps/files_sharing/lib/External/Storage.php index 9172ff932027a..bfaf9a994421f 100644 --- a/apps/files_sharing/lib/External/Storage.php +++ b/apps/files_sharing/lib/External/Storage.php @@ -137,11 +137,6 @@ public function getCache($path = '', $storage = null) { return $this->cache; } - /** - * @param string $path - * @param \OC\Files\Storage\Storage $storage - * @return \OCA\Files_Sharing\External\Scanner - */ public function getScanner($path = '', $storage = null) { if (!$storage) { $storage = $this; diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php index cecc1d5cb985a..0a6a068c44156 100644 --- a/apps/files_sharing/lib/SharedStorage.php +++ b/apps/files_sharing/lib/SharedStorage.php @@ -488,12 +488,6 @@ public function unshareStorage(): bool { return true; } - /** - * @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) { /** @var ILockingStorage $targetStorage */ [$targetStorage, $targetInternalPath] = $this->resolvePath($path); @@ -505,11 +499,6 @@ public function acquireLock($path, $type, ILockingProvider $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) { /** @var ILockingStorage $targetStorage */ [$targetStorage, $targetInternalPath] = $this->resolvePath($path); @@ -521,11 +510,6 @@ public function releaseLock($path, $type, ILockingProvider $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) { /** @var ILockingStorage $targetStorage */ [$targetStorage, $targetInternalPath] = $this->resolvePath($path); diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index 663041ed92c82..a01515ac894fa 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -129,10 +129,6 @@ private function normalizePath($path) { /** * 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 181da79cebec5..b6f14321f6141 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -347,12 +347,6 @@ public function getWatcher($path = '', $storage = null) { 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 @@ public function getPropagator($storage = null) { 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 @@ public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $t return $result; } - /** - * @inheritdoc - */ public function getMetaData($path) { if (Filesystem::isFileBlacklisted($path)) { throw new ForbiddenException('Invalid path: ' . $path, false); @@ -682,12 +674,6 @@ public function getMetaData($path) { 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 @@ public function acquireLock($path, $type, ILockingProvider $provider) { } } - /** - * @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 @@ public function releaseLock($path, $type, ILockingProvider $provider) { } } - /** - * @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 f7151f4a0058b..fd1d287629fc2 100644 --- a/lib/private/Files/Storage/Home.php +++ b/lib/private/Files/Storage/Home.php @@ -56,12 +56,6 @@ public function getCache($path = '', $storage = null) { 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 c550cf75bc69c..5b1dcb623ba7a 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -164,9 +164,6 @@ public function stat($path) { 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 aff914ee12afe..d6d1d26c35a84 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 @@ */ 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 0f1abada168ad..aaf0acdc74f7b 100644 --- a/lib/private/Files/Storage/Wrapper/Availability.php +++ b/lib/private/Files/Storage/Wrapper/Availability.php @@ -422,7 +422,6 @@ public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $t } } - /** {@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 a696a3e48026e..48c6c38c8483f 100644 --- a/lib/private/Files/Storage/Wrapper/Encoding.php +++ b/lib/private/Files/Storage/Wrapper/Encoding.php @@ -418,13 +418,6 @@ public function hasUpdated($path, $time) { 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 @@ public function getCache($path = '', $storage = null) { 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 46b40b922445d..e61ded4bc380f 100644 --- a/lib/private/Files/Storage/Wrapper/Jail.php +++ b/lib/private/Files/Storage/Wrapper/Jail.php @@ -358,13 +358,6 @@ public function hasUpdated($path, $time) { 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 @@ public function getOwner($path): string|false { 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 @@ public function getMetaData($path) { 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 c502de41a866f..d6b745c0d3119 100644 --- a/lib/private/Files/Storage/Wrapper/PermissionsMask.php +++ b/lib/private/Files/Storage/Wrapper/PermissionsMask.php @@ -101,13 +101,6 @@ public function fopen($path, $mode) { } } - /** - * 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 2a6d04da849ea..93dcacdfb42f0 100644 --- a/lib/private/Files/Storage/Wrapper/Wrapper.php +++ b/lib/private/Files/Storage/Wrapper/Wrapper.php @@ -353,13 +353,6 @@ public function hasUpdated($path, $time) { 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 @@ public function getCache($path = '', $storage = null) { 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 @@ public function getOwner($path): string|false { 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 @@ public function getUpdater($storage = null) { return $this->getWrapperStorage()->getUpdater($storage); } - /** - * @return \OC\Files\Cache\Storage - */ public function getStorageCache() { return $this->getWrapperStorage()->getStorageCache(); } @@ -564,34 +540,18 @@ public function getMetaData($path) { 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);