aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/Lib
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-03-28 17:15:01 +0100
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>2024-04-04 11:45:22 +0200
commitcd53e71d802c012ab9a2f931ab800d5b75f64ebc (patch)
tree539b27c68ecbfcc03b79935e6c3b57f15669d9da /apps/files_external/lib/Lib
parent4311f60ebb968572d3732abdb8e5123c64ace115 (diff)
downloadnextcloud-server-cd53e71d802c012ab9a2f931ab800d5b75f64ebc.tar.gz
nextcloud-server-cd53e71d802c012ab9a2f931ab800d5b75f64ebc.zip
chore: Improve phpdoc typing to silence psalm errors
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/GlobalAuth.php3
-rw-r--r--apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php3
-rw-r--r--apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php3
-rw-r--r--apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php3
-rw-r--r--apps/files_external/lib/Lib/Auth/Password/UserProvided.php3
-rw-r--r--apps/files_external/lib/Lib/Auth/PublicKey/RSA.php3
-rw-r--r--apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php3
-rw-r--r--apps/files_external/lib/Lib/Backend/InvalidBackend.php3
-rw-r--r--apps/files_external/lib/Lib/Backend/SMB.php3
-rw-r--r--apps/files_external/lib/Lib/Backend/SMB_OC.php3
-rw-r--r--apps/files_external/lib/Lib/StorageModifierTrait.php1
11 files changed, 31 insertions, 0 deletions
diff --git a/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php b/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php
index 9797a75d428..174efd96e3c 100644
--- a/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php
+++ b/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php
@@ -70,6 +70,9 @@ class GlobalAuth extends AuthMechanism {
]);
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
if ($storage->getType() === StorageConfig::MOUNT_TYPE_ADMIN) {
$uid = '';
diff --git a/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php b/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php
index 5f4322814df..5dc290d3548 100644
--- a/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php
+++ b/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php
@@ -112,6 +112,9 @@ class LoginCredentials extends AuthMechanism {
return $credentials;
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
if (!isset($user)) {
throw new InsufficientDataForMeaningfulAnswerException('No login credentials saved');
diff --git a/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php b/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php
index af781172c35..d2587991a96 100644
--- a/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php
+++ b/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php
@@ -51,6 +51,9 @@ class SessionCredentials extends AuthMechanism {
->addParameters([]);
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
try {
$credentials = $this->credentialsStore->getLoginCredentials();
diff --git a/apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php b/apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php
index 28457cf59de..d43c4327b6b 100644
--- a/apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php
+++ b/apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php
@@ -69,6 +69,9 @@ class UserGlobalAuth extends AuthMechanism {
$this->credentialsManager->store($user->getUID(), self::CREDENTIALS_IDENTIFIER, $credentials);
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
if ($user === null) {
throw new InsufficientDataForMeaningfulAnswerException('No credentials saved');
diff --git a/apps/files_external/lib/Lib/Auth/Password/UserProvided.php b/apps/files_external/lib/Lib/Auth/Password/UserProvided.php
index 2dd39e3a47d..7fcbdb38336 100644
--- a/apps/files_external/lib/Lib/Auth/Password/UserProvided.php
+++ b/apps/files_external/lib/Lib/Auth/Password/UserProvided.php
@@ -71,6 +71,9 @@ class UserProvided extends AuthMechanism implements IUserProvided {
]);
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
if (!isset($user)) {
throw new InsufficientDataForMeaningfulAnswerException('No credentials saved');
diff --git a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php
index 2c52f654805..67259ffc5b3 100644
--- a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php
+++ b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php
@@ -56,6 +56,9 @@ class RSA extends AuthMechanism {
;
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
$auth = new RSACrypt();
$auth->setPassword($this->config->getSystemValue('secret', ''));
diff --git a/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php b/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php
index bd6d87c22f8..30ff5dd2a4c 100644
--- a/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php
+++ b/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php
@@ -54,6 +54,9 @@ class RSAPrivateKey extends AuthMechanism {
]);
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
$auth = new RSACrypt();
$auth->setPassword($this->config->getSystemValue('secret', ''));
diff --git a/apps/files_external/lib/Lib/Backend/InvalidBackend.php b/apps/files_external/lib/Lib/Backend/InvalidBackend.php
index f9a0fd040ed..88c73470279 100644
--- a/apps/files_external/lib/Lib/Backend/InvalidBackend.php
+++ b/apps/files_external/lib/Lib/Backend/InvalidBackend.php
@@ -60,6 +60,9 @@ class InvalidBackend extends Backend {
return $this->invalidId;
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
$storage->setBackendOption('exception', new \Exception('Unknown storage backend "' . $this->invalidId . '"', StorageNotAvailableException::STATUS_ERROR));
}
diff --git a/apps/files_external/lib/Lib/Backend/SMB.php b/apps/files_external/lib/Lib/Backend/SMB.php
index 7fa2f3ae67a..29f6c727a10 100644
--- a/apps/files_external/lib/Lib/Backend/SMB.php
+++ b/apps/files_external/lib/Lib/Backend/SMB.php
@@ -77,6 +77,9 @@ class SMB extends Backend {
->setLegacyAuthMechanism($legacyAuth);
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
$auth = $storage->getAuthMechanism();
if ($auth->getScheme() === AuthMechanism::SCHEME_PASSWORD) {
diff --git a/apps/files_external/lib/Lib/Backend/SMB_OC.php b/apps/files_external/lib/Lib/Backend/SMB_OC.php
index 33cb80c2bb5..5f1ed3b8334 100644
--- a/apps/files_external/lib/Lib/Backend/SMB_OC.php
+++ b/apps/files_external/lib/Lib/Backend/SMB_OC.php
@@ -60,6 +60,9 @@ class SMB_OC extends Backend {
;
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
$username_as_share = ($storage->getBackendOption('username_as_share') === true);
diff --git a/apps/files_external/lib/Lib/StorageModifierTrait.php b/apps/files_external/lib/Lib/StorageModifierTrait.php
index 709539219fa..096e091576e 100644
--- a/apps/files_external/lib/Lib/StorageModifierTrait.php
+++ b/apps/files_external/lib/Lib/StorageModifierTrait.php
@@ -46,6 +46,7 @@ trait StorageModifierTrait {
*
* @param StorageConfig $storage
* @param IUser $user User the storage is being used as
+ * @return void
* @throws InsufficientDataForMeaningfulAnswerException
* @throws StorageNotAvailableException
*/