summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-10-18 14:42:43 +0200
committerGitHub <noreply@github.com>2022-10-18 14:42:43 +0200
commit00c2c620acfdcf188a3ea9047458414749520fa9 (patch)
treeb2c842c9d1754d18ecf274339238aae748985093 /lib
parentc67146642261084ad8584207441408e78d84af35 (diff)
parent419828c791f115fdef3bfa18b9f5c27b8057b292 (diff)
downloadnextcloud-server-00c2c620acfdcf188a3ea9047458414749520fa9.tar.gz
nextcloud-server-00c2c620acfdcf188a3ea9047458414749520fa9.zip
Merge pull request #34554 from nextcloud/fix/psalm-twofactor-registry
Fix wrong types in phpdoc for twofactor registry
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php4
-rw-r--r--lib/private/Authentication/TwoFactorAuth/Manager.php4
-rw-r--r--lib/public/Authentication/TwoFactorAuth/IRegistry.php2
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
index e9aa15e11b6..19d80218562 100644
--- a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
+++ b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
@@ -47,7 +47,7 @@ class ProviderUserAssignmentDao {
/**
* Get all assigned provider IDs for the given user ID
*
- * @return string[] where the array key is the provider ID (string) and the
+ * @return array<string, bool> where the array key is the provider ID (string) and the
* value is the enabled state (bool)
*/
public function getState(string $uid): array {
@@ -59,7 +59,7 @@ class ProviderUserAssignmentDao {
$result = $query->execute();
$providers = [];
foreach ($result->fetchAll() as $row) {
- $providers[$row['provider_id']] = 1 === (int)$row['enabled'];
+ $providers[(string)$row['provider_id']] = 1 === (int)$row['enabled'];
}
$result->closeCursor();
diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php
index 66e7c090e42..37a9f03d073 100644
--- a/lib/private/Authentication/TwoFactorAuth/Manager.php
+++ b/lib/private/Authentication/TwoFactorAuth/Manager.php
@@ -170,10 +170,10 @@ class Manager {
*
* @todo remove in Nextcloud 17 as by then all providers should have been updated
*
- * @param string[] $providerStates
+ * @param array<string, bool> $providerStates
* @param IProvider[] $providers
* @param IUser $user
- * @return string[] the updated $providerStates variable
+ * @return array<string, bool> the updated $providerStates variable
*/
private function fixMissingProviderStates(array $providerStates,
array $providers, IUser $user): array {
diff --git a/lib/public/Authentication/TwoFactorAuth/IRegistry.php b/lib/public/Authentication/TwoFactorAuth/IRegistry.php
index 1f1b82a4426..0f164902f67 100644
--- a/lib/public/Authentication/TwoFactorAuth/IRegistry.php
+++ b/lib/public/Authentication/TwoFactorAuth/IRegistry.php
@@ -53,7 +53,7 @@ interface IRegistry {
* the given user.
*
* @since 14.0.0
- * @return string[] where the array key is the provider ID (string) and the
+ * @return array<string, bool> where the array key is the provider ID (string) and the
* value is the enabled state (bool)
*/
public function getProviderStates(IUser $user): array;