From: Thomas Citharel Date: Fri, 23 Jun 2023 07:09:38 +0000 (+0200) Subject: style(caldav): improve getDenormalizedData method X-Git-Tag: v28.0.0beta1~809^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1e390e198220cf21357f633a11cb4ced77d849d8;p=nextcloud-server.git style(caldav): improve getDenormalizedData method Signed-off-by: Thomas Citharel --- diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index fc23b6545e5..c57d3a2764f 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -2732,7 +2732,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param string $calendarData * @return array */ - public function getDenormalizedData($calendarData) { + public function getDenormalizedData(string $calendarData): array { $vObject = Reader::read($calendarData); $vEvents = []; $componentType = null; @@ -2746,7 +2746,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 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; }