diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-04-02 17:13:35 +0200 |
---|---|---|
committer | Richard Steinmetz <richard@steinmetz.cloud> | 2024-04-08 11:29:09 +0200 |
commit | ab6afe0111b25bd2d764bb807f086808ae7a5534 (patch) | |
tree | daa4749047458d69e04da2d8e1fef348ceed6630 /lib/private/Authentication | |
parent | 9ef70f0c4e94bd32d6b7732d4735c561901cb3df (diff) | |
download | nextcloud-server-ab6afe0111b25bd2d764bb807f086808ae7a5534.tar.gz nextcloud-server-ab6afe0111b25bd2d764bb807f086808ae7a5534.zip |
fix: Fix new psalm errors from update
Not sure about the SimpleContainer modification, let’s see what CI says
about that.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/Authentication')
-rw-r--r-- | lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php index db5da97f275..458ed690e56 100644 --- a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php +++ b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php @@ -91,8 +91,6 @@ class ProviderUserAssignmentDao { /** * Delete all provider states of a user and return the provider IDs * - * @param string $uid - * * @return list<array{provider_id: string, uid: string, enabled: bool}> */ public function deleteByUser(string $uid): array { @@ -100,7 +98,7 @@ class ProviderUserAssignmentDao { $selectQuery = $qb1->select('*') ->from(self::TABLE_NAME) ->where($qb1->expr()->eq('uid', $qb1->createNamedParameter($uid))); - $selectResult = $selectQuery->execute(); + $selectResult = $selectQuery->executeQuery(); $rows = $selectResult->fetchAll(); $selectResult->closeCursor(); @@ -108,15 +106,15 @@ class ProviderUserAssignmentDao { $deleteQuery = $qb2 ->delete(self::TABLE_NAME) ->where($qb2->expr()->eq('uid', $qb2->createNamedParameter($uid))); - $deleteQuery->execute(); + $deleteQuery->executeStatement(); - return array_map(function (array $row) { + return array_values(array_map(function (array $row) { return [ - 'provider_id' => $row['provider_id'], - 'uid' => $row['uid'], - 'enabled' => (int) $row['enabled'] === 1, + 'provider_id' => (string)$row['provider_id'], + 'uid' => (string)$row['uid'], + 'enabled' => ((int) $row['enabled']) === 1, ]; - }, $rows); + }, $rows)); } public function deleteAll(string $providerId): void { |