mirror of https://github.com/nextcloud/server
Fix psalm spotted type errors
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
2c8b415c55
commit
35069ad86a
|
@ -359,11 +359,11 @@ class Database extends ABackend implements
|
|||
->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();
|
||||
}
|
||||
|
@ -553,10 +553,10 @@ class Database extends ABackend implements
|
|||
|
||||
$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();
|
||||
|
|
|
@ -48,13 +48,13 @@ interface IBatchMethodsBackend {
|
|||
/**
|
||||
* @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;
|
||||
|
|
Loading…
Reference in New Issue