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:
Cristian Scheid 2026-01-12 08:05:31 -03:00 committed by nextcloud-command
parent a109ed365f
commit d3dd2f41d5
2 changed files with 1 additions and 5 deletions

View file

@ -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())

View file

@ -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;