style(caldav): improve getDenormalizedData method

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
pull/31790/head
Thomas Citharel 2023-06-23 09:09:38 +07:00 committed by Anna (Rebase PR Action)
parent 3886b00a33
commit 1e390e1982
1 changed files with 2 additions and 2 deletions

@ -2732,7 +2732,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param string $calendarData * @param string $calendarData
* @return array * @return array
*/ */
public function getDenormalizedData($calendarData) { public function getDenormalizedData(string $calendarData): array {
$vObject = Reader::read($calendarData); $vObject = Reader::read($calendarData);
$vEvents = []; $vEvents = [];
$componentType = null; $componentType = null;
@ -2746,7 +2746,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
if ($component->name !== 'VTIMEZONE') { if ($component->name !== 'VTIMEZONE') {
// Finding all VEVENTs, and track them // Finding all VEVENTs, and track them
if ($component->name === 'VEVENT') { if ($component->name === 'VEVENT') {
array_push($vEvents, $component); $vEvents[] = $component;
if ($component->DTSTART) { if ($component->DTSTART) {
$hasDTSTART = true; $hasDTSTART = true;
} }