aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Group
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-03-02 19:34:20 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2021-03-03 14:52:47 +0100
commit68ec18323d07e7293fd59c82d51300a6d9d68176 (patch)
treef8b2094b663d481dda920d1df8f9c852fa42ee36 /lib/private/Group
parent252d2d39583c7daf838a6a24d0f72660ed01c371 (diff)
downloadnextcloud-server-68ec18323d07e7293fd59c82d51300a6d9d68176.tar.gz
nextcloud-server-68ec18323d07e7293fd59c82d51300a6d9d68176.zip
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>
Diffstat (limited to 'lib/private/Group')
-rw-r--r--lib/private/Group/Manager.php10
1 files changed, 5 insertions, 5 deletions
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) {