From 226027abf777d921eb30095e2f5fbcb914e940a8 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 23 Jun 2023 09:09:38 +0200 Subject: [PATCH] style(caldav): improve getDenormalizedData method Signed-off-by: Thomas Citharel --- apps/dav/lib/CalDAV/CalDavBackend.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 6dbcf0b16e15e..f0fd29852bb6b 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -2700,7 +2700,7 @@ protected function addChange($calendarId, $objectUri, $operation, $calendarType * @param string $calendarData * @return array */ - public function getDenormalizedData($calendarData) { + public function getDenormalizedData(string $calendarData): array { $vObject = Reader::read($calendarData); $vEvents = []; $componentType = null; @@ -2714,7 +2714,7 @@ public function getDenormalizedData($calendarData) { if ($component->name !== 'VTIMEZONE') { // Finding all VEVENTs, and track them if ($component->name === 'VEVENT') { - array_push($vEvents, $component); + $vEvents[] = $component; if ($component->DTSTART) { $hasDTSTART = true; }