]> source.dussan.org Git - nextcloud-server.git/commitdiff
style(caldav): improve getDenormalizedData method 31790/head
authorThomas Citharel <tcit@tcit.fr>
Fri, 23 Jun 2023 07:09:38 +0000 (09:09 +0200)
committerAnna (Rebase PR Action) <miaulalala@users.noreply.github.com>
Tue, 27 Jun 2023 11:16:47 +0000 (11:16 +0000)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
apps/dav/lib/CalDAV/CalDavBackend.php

index fc23b6545e5148701ff05ebe1e8e459622e5cbc3..c57d3a2764f1e88a2a4669f9128e46e40cdf1e95 100644 (file)
@@ -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;
                                        }