From 68ec18323d07e7293fd59c82d51300a6d9d68176 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma <roeland@famdouma.nl> Date: Tue, 2 Mar 2021 19:34:20 +0100 Subject: Fix types in the Group Manager Psalm found an issue. However the issue found was because of lying docblocks. Fixed those and did some typing to make it all better. For #25839 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl> --- lib/private/Group/Manager.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/private/Group') diff --git a/lib/private/Group/Manager.php b/lib/private/Group/Manager.php index 4c731a9f488..145b3631206 100644 --- a/lib/private/Group/Manager.php +++ b/lib/private/Group/Manager.php @@ -276,7 +276,7 @@ class Manager extends PublicEmitter implements IGroupManager { * @param string $uid the user id * @return \OC\Group\Group[] */ - public function getUserIdGroups($uid) { + public function getUserIdGroups(string $uid): array { $groups = []; foreach ($this->getUserIdGroupIds($uid) as $groupId) { @@ -321,17 +321,17 @@ class Manager extends PublicEmitter implements IGroupManager { * get a list of group ids for a user * * @param IUser $user - * @return array with group ids + * @return string[] with group ids */ - public function getUserGroupIds(IUser $user) { + public function getUserGroupIds(IUser $user): array { return $this->getUserIdGroupIds($user->getUID()); } /** * @param string $uid the user id - * @return GroupInterface[] + * @return string[] */ - private function getUserIdGroupIds($uid) { + private function getUserIdGroupIds(string $uid): array { if (!isset($this->cachedUserGroups[$uid])) { $groups = []; foreach ($this->backends as $backend) { -- cgit v1.2.3