diff --git a/src/Generators/Ics.php b/src/Generators/Ics.php index 21273b3..dd325a0 100644 --- a/src/Generators/Ics.php +++ b/src/Generators/Ics.php @@ -7,7 +7,7 @@ /** * @see https://icalendar.org/RFC-Specifications/iCalendar-RFC-5545/ - * @psalm-type IcsOptions = array{UID?: string, URL?: string, REMINDER?: array{DESCRIPTION?: string, TIME?: \DateTimeInterface}} + * @psalm-type IcsOptions = array{UID?: string, URL?: string, PRODID?: string, REMINDER?: array{DESCRIPTION?: string, TIME?: \DateTimeInterface}} */ class Ics implements Generator { @@ -86,7 +86,7 @@ public function generate(Link $link): string } /** - * @param non-empty-list $propertiesAndComponents + * @param non-empty-list $propertiesAndComponents * @return non-empty-string */ protected function buildLink(array $propertiesAndComponents): string @@ -94,6 +94,10 @@ protected function buildLink(array $propertiesAndComponents): string return 'data:text/calendar;charset=utf8;base64,'.base64_encode(implode("\r\n", $propertiesAndComponents)); } + /** + * @param non-empty-list $propertiesAndComponents + * @return non-empty-string + */ protected function buildFile(array $propertiesAndComponents): string { return implode("\r\n", $propertiesAndComponents); diff --git a/src/Link.php b/src/Link.php index 9219f5d..efb3905 100644 --- a/src/Link.php +++ b/src/Link.php @@ -10,12 +10,6 @@ use Spatie\CalendarLinks\Generators\Yahoo; /** - * @property-read string $title - * @property-read \DateTimeInterface|\DateTime|\DateTimeImmutable $from - * @property-read \DateTimeInterface|\DateTime|\DateTimeImmutable $to - * @property-read string $description - * @property-read string $address - * @property-read bool $allDay * @psalm-import-type IcsOptions from \Spatie\CalendarLinks\Generators\Ics */ class Link