From a109ed365f120d99d2b36c968dd9e92385473871 Mon Sep 17 00:00:00 2001 From: Cristian Scheid <74515775+cristianscheid@users.noreply.github.com> Date: Thu, 8 Jan 2026 14:56:36 -0300 Subject: [PATCH] refactor: improve code quality and doc block in PersonalInfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Cristian Scheid <74515775+cristianscheid@users.noreply.github.com> --- apps/settings/lib/Settings/Personal/PersonalInfo.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/settings/lib/Settings/Personal/PersonalInfo.php b/apps/settings/lib/Settings/Personal/PersonalInfo.php index 4f62e4fc827..c7d0c366014 100644 --- a/apps/settings/lib/Settings/Personal/PersonalInfo.php +++ b/apps/settings/lib/Settings/Personal/PersonalInfo.php @@ -197,18 +197,16 @@ class PersonalInfo implements ISettings { } /** - * returns a sorted list of the user's team memberships + * returns a list of the user's team memberships, sorted alphabetically + * @return list team names */ private function getTeamMemberships(IUser $user): array { - $circlesEnabled = $this->appManager->isEnabledForUser('circles'); - if (!$circlesEnabled) { + if (!$this->appManager->isEnabledForUser('circles')) { return []; } $teams = array_map( - static function (Team $team) { - return $team->getDisplayName(); - }, + static fn (Team $team): string => $team->getDisplayName(), $this->teamManager->getMemberships($user->getUID()) ); sort($teams);