aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/Lib
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-09-15 14:13:29 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-09-16 18:10:48 +0200
commit801733e5232620932dca14452b3b84dbdad14ed7 (patch)
tree6fcf0585d469710e56457a4a5240fc623b027628 /apps/files_external/lib/Lib
parentdde0b48c9375ed4f5fd7bac3b03e2b1c75ce9926 (diff)
downloadnextcloud-server-801733e5232620932dca14452b3b84dbdad14ed7.tar.gz
nextcloud-server-801733e5232620932dca14452b3b84dbdad14ed7.zip
fix: Remove OCP\Files\Storage interface deprecated since version 9
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/files_external/lib/Lib')
-rw-r--r--apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php4
-rw-r--r--apps/files_external/lib/Lib/StorageModifierTrait.php12
2 files changed, 7 insertions, 9 deletions
diff --git a/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php b/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php
index d81c73ca13f..314ab82385e 100644
--- a/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php
+++ b/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php
@@ -12,7 +12,7 @@ use OCA\Files_External\Lib\SessionStorageWrapper;
use OCA\Files_External\Lib\StorageConfig;
use OCP\Authentication\Exceptions\CredentialsUnavailableException;
use OCP\Authentication\LoginCredentials\IStore as CredentialsStore;
-use OCP\Files\Storage;
+use OCP\Files\Storage\IStorage;
use OCP\Files\StorageAuthException;
use OCP\IL10N;
use OCP\IUser;
@@ -56,7 +56,7 @@ class SessionCredentials extends AuthMechanism {
$storage->setBackendOption('password', $credentials->getPassword());
}
- public function wrapStorage(Storage $storage) {
+ public function wrapStorage(IStorage $storage): IStorage {
return new SessionStorageWrapper(['storage' => $storage]);
}
}
diff --git a/apps/files_external/lib/Lib/StorageModifierTrait.php b/apps/files_external/lib/Lib/StorageModifierTrait.php
index 7cc7a15605c..4b9264f4223 100644
--- a/apps/files_external/lib/Lib/StorageModifierTrait.php
+++ b/apps/files_external/lib/Lib/StorageModifierTrait.php
@@ -6,7 +6,7 @@
*/
namespace OCA\Files_External\Lib;
-use OCP\Files\Storage;
+use OCP\Files\Storage\IStorage;
use OCP\Files\StorageNotAvailableException;
use OCP\IUser;
@@ -28,8 +28,8 @@ trait StorageModifierTrait {
/**
* Modify a StorageConfig parameters
*
- * @param StorageConfig $storage
- * @param IUser $user User the storage is being used as
+ * @param StorageConfig &$storage
+ * @param ?IUser $user User the storage is being used as
* @return void
* @throws InsufficientDataForMeaningfulAnswerException
* @throws StorageNotAvailableException
@@ -38,14 +38,12 @@ trait StorageModifierTrait {
}
/**
- * Wrap a Storage if necessary
+ * Wrap a storage if necessary
*
- * @param Storage $storage
- * @return Storage
* @throws InsufficientDataForMeaningfulAnswerException
* @throws StorageNotAvailableException
*/
- public function wrapStorage(Storage $storage) {
+ public function wrapStorage(IStorage $storage): IStorage {
return $storage;
}
}