Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix psalm spotted type errors
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Sep 5, 2023
commit 35069ad86a96923b0e39c897bb839058de4b4b34
16 changes: 8 additions & 8 deletions lib/private/Group/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,11 @@ public function groupsExists(array $gids): array {
->where($qb->expr()->in('gid', $qb->createNamedParameter($chunk, IQueryBuilder::PARAM_STR_ARRAY)))
->executeQuery();
while ($row = $result->fetch()) {
$this->groupCache[$row['gid']] = [
'displayname' => $row['displayname'],
'gid' => $row['gid'],
$this->groupCache[(string)$row['gid']] = [
'displayname' => (string)$row['displayname'],
'gid' => (string)$row['gid'],
];
$existingGroups[] = $gid;
$existingGroups[] = (string)$row['gid'];
}
$result->closeCursor();
}
Expand Down Expand Up @@ -553,10 +553,10 @@ public function getGroupsDetails(array $gids): array {

$result = $query->executeQuery();
while ($row = $result->fetch()) {
$details[$row['gid']] = ['displayName' => $row['displayname']];
$this->groupCache[$row['gid']] = [
'displayname' => $row['displayname'],
'gid' => $row['gid'],
$details[(string)$row['gid']] = ['displayName' => (string)$row['displayname']];
$this->groupCache[(string)$row['gid']] = [
'displayname' => (string)$row['displayname'],
'gid' => (string)$row['gid'],
];
}
$result->closeCursor();
Expand Down
8 changes: 4 additions & 4 deletions lib/public/Group/Backend/IBatchMethodsBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ public function groupsExists(array $gids): array;
/**
* @brief Batch method to get the group details of a list of groups
*
* The default implementation in ABackend will just call getGroupDetail in
* a loop. But a GroupBackend implementation should provides a more optimized
* override this method to provide a more optimized way to execute this operation.
* The default implementation in ABackend will just call getGroupDetails in
* a loop. But a GroupBackend implementation should override this method
* to provide a more optimized way to execute this operation.
*
* @throw \RuntimeException if called on a backend that doesn't implements IGroupDetailsBackend
*
* @return array<string, array{displayName: string}>
* @return array<string, array{displayName?: string}>
* @since 28.0.0
*/
public function getGroupsDetails(array $gids): array;
Expand Down