Skip to content

Commit

Permalink
fixup! fix: add VTIMEZONE to Appointments
Browse files Browse the repository at this point in the history
  • Loading branch information
miaulalala committed Nov 7, 2023
1 parent 3ecbe66 commit 639d43b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Service/Appointments/TimezoneGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

namespace OCA\Calendar\Service\Appointments;

use Sabre\VObject\Component;
use Sabre\VObject\Component\VCalendar;
use Sabre\VObject\Component\VTimeZone;
use Sabre\VObject\TimeZoneUtil;
Expand Down Expand Up @@ -132,7 +133,7 @@ public function generateVtimezone(string $timezone, int $from, int $to): ?VTimeZ

// add X-MICROSOFT-CDO-TZID if available
$microsoftExchangeMap = array_flip(TimeZoneUtil::$microsoftExchangeMap);
if (array_key_exists($tz->getName(), $microsoftExchangeMap)) {
if (!empty($microsoftExchangeMap) && array_key_exists($tz->getName(), $microsoftExchangeMap)) {

Check failure on line 136 in lib/Service/Appointments/TimezoneGenerator.php

View workflow job for this annotation

GitHub Actions / Nextcloud dev-master

NoValue

lib/Service/Appointments/TimezoneGenerator.php:136:73: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)

Check failure on line 136 in lib/Service/Appointments/TimezoneGenerator.php

View workflow job for this annotation

GitHub Actions / Nextcloud dev-stable27

NoValue

lib/Service/Appointments/TimezoneGenerator.php:136:73: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)

Check failure on line 136 in lib/Service/Appointments/TimezoneGenerator.php

View workflow job for this annotation

GitHub Actions / Nextcloud dev-stable26

NoValue

lib/Service/Appointments/TimezoneGenerator.php:136:73: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)

Check failure on line 136 in lib/Service/Appointments/TimezoneGenerator.php

View workflow job for this annotation

GitHub Actions / Nextcloud dev-stable25

NoValue

lib/Service/Appointments/TimezoneGenerator.php:136:73: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)
$vtimezone->add('X-MICROSOFT-CDO-TZID', $microsoftExchangeMap[$tz->getName()]);
}

Expand Down
1 change: 1 addition & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<referencedClass name="Psr\Http\Client\ClientExceptionInterface" />
<referencedClass name="Sabre\VObject\Component\VCalendar" />
<referencedClass name="Sabre\VObject\Component\VTimezone" />
<referencedClass name="Sabre\VObject\TimeZoneUtil" />
<referencedClass name="Symfony\Component\HttpFoundation\IpUtils" />
<referencedClass name="Symfony\Component\Console\Command\Command" />
<referencedClass name="Symfony\Component\Console\Input\InputArgument" />
Expand Down

0 comments on commit 639d43b

Please sign in to comment.