summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2023-06-23 09:09:38 +0200
committerThomas Citharel <tcit@tcit.fr>2023-06-29 11:53:31 +0200
commit34c8f5da2dfc4b2760c1e6ba2679e5e3febc64f8 (patch)
tree6f66d35156e873836f3f0e7d3bd42c112ab0e589
parent4acc015e349db6117d13e5555c7cb7c03e64ea88 (diff)
downloadnextcloud-server-34c8f5da2dfc4b2760c1e6ba2679e5e3febc64f8.tar.gz
nextcloud-server-34c8f5da2dfc4b2760c1e6ba2679e5e3febc64f8.zip
style(caldav): improve getDenormalizedData method
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index 2fdbbd06780..cad275be7a8 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -2712,7 +2712,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;
@@ -2726,7 +2726,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;
}