style(caldav): improve getDenormalizedData method

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-06-23 09:09:38 +02:00
parent 4acc015e34
commit 34c8f5da2d
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -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;
}