Skip to content

Commit

Permalink
Fix PHPDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
alies-dev committed Jan 28, 2024
1 parent c489027 commit 70ffd79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 6 additions & 2 deletions src/Generators/Ics.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -86,14 +86,18 @@ public function generate(Link $link): string
}

/**
* @param non-empty-list<non-empty-string> $propertiesAndComponents
* @param non-empty-list<string> $propertiesAndComponents
* @return non-empty-string
*/
protected function buildLink(array $propertiesAndComponents): string
{
return 'data:text/calendar;charset=utf8;base64,'.base64_encode(implode("\r\n", $propertiesAndComponents));
}

/**
* @param non-empty-list<string> $propertiesAndComponents
* @return non-empty-string
*/
protected function buildFile(array $propertiesAndComponents): string
{
return implode("\r\n", $propertiesAndComponents);
Expand Down
6 changes: 0 additions & 6 deletions src/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 70ffd79

Please sign in to comment.