Skip to content

Commit

Permalink
style(caldav): improve getDenormalizedData method
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
  • Loading branch information
tcitworld committed Jun 29, 2023
1 parent 5236b37 commit f95db79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/dav/lib/CalDAV/CalDavBackend.php
Expand Up @@ -2732,7 +2732,7 @@ protected function addChange(int $calendarId, string $objectUri, int $operation,
* @param string $calendarData
* @return array
*/
public function getDenormalizedData($calendarData) {
public function getDenormalizedData(string $calendarData): array {
$vObject = Reader::read($calendarData);
$vEvents = [];
$componentType = null;
Expand All @@ -2746,7 +2746,7 @@ public function getDenormalizedData($calendarData) {
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;
}
Expand Down

0 comments on commit f95db79

Please sign in to comment.