mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
refactor: use list<> syntax and remove unecessary check
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com> Signed-off-by: Cristian Scheid <74515775+cristianscheid@users.noreply.github.com>
This commit is contained in:
parent
a109ed365f
commit
d3dd2f41d5
2 changed files with 1 additions and 5 deletions
|
|
@ -201,10 +201,6 @@ class PersonalInfo implements ISettings {
|
|||
* @return list<string> team names
|
||||
*/
|
||||
private function getTeamMemberships(IUser $user): array {
|
||||
if (!$this->appManager->isEnabledForUser('circles')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$teams = array_map(
|
||||
static fn (Team $team): string => $team->getDisplayName(),
|
||||
$this->teamManager->getMemberships($user->getUID())
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ interface ITeamManager {
|
|||
/**
|
||||
* Returns all teams that a given user is a member of
|
||||
*
|
||||
* @return Team[]
|
||||
* @return list<Team>
|
||||
* @since 33.0.0
|
||||
*/
|
||||
public function getMemberships(string $userId): array;
|
||||
|
|
|
|||
Loading…
Reference in a new issue