]> source.dussan.org Git - nextcloud-server.git/commitdiff
style(caldav): improve getDenormalizedData method 39060/head
authorThomas Citharel <tcit@tcit.fr>
Fri, 23 Jun 2023 07:09:38 +0000 (09:09 +0200)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Wed, 12 Jul 2023 17:57:23 +0000 (19:57 +0200)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
apps/dav/lib/CalDAV/CalDavBackend.php

index 6dbcf0b16e15e7fd007ad372ede585db81f4c3f8..f0fd29852bb6b4ce68c2ffa14657d33440e403b0 100644 (file)
@@ -2700,7 +2700,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;
@@ -2714,7 +2714,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;
                                        }