From 9c481bf15d3a819a4d702c4d6014b4608d1164cf Mon Sep 17 00:00:00 2001 From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Thu, 11 Jul 2024 10:43:25 +0200 Subject: [PATCH] chore: small optimization 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: Git'Fellow <12234510+solracsf@users.noreply.github.com> --- lib/Controller/FolderController.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/Controller/FolderController.php b/lib/Controller/FolderController.php index 61a156f6b..a2ed2262b 100644 --- a/lib/Controller/FolderController.php +++ b/lib/Controller/FolderController.php @@ -304,13 +304,8 @@ private function buildOCSResponseXML(string $format, DataResponse $data): V1Resp } private function folderDataForXML(array $data): array { - $groups = []; - - if (isset($data['group_details'])) { - $groups = $data['group_details']; - unset($data['group_details']); - } - + $groups = $data['group_details'] ?? []; + unset($data['group_details']); $data['groups'] = []; foreach ($groups as $id => $group) { $data['groups'][] = [