Interfaces names should end with "Interface" 4
- Read doc
- Productivity
- Info
More information: https://insight.symfony.com/what-we-analyse/php.interface_has_no_interface_suffix
- /**
- * Port giving the current time, used for DTSTAMP when the event does not set it.
- * Same signature as PSR-20 ClockInterface::now(), without depending on psr/clock.
- */
- interface Clock
- {
- public function now(): \DateTimeImmutable;
- }
- namespace Ical\Application;
- /**
- * Port creating the UID of an event that has none (RFC 5545 §3.8.4.7).
- */
- interface UidGenerator
- {
- /**
- * A globally unique identifier, e.g. "<random>@$domain".
- *
- * @param string $domain the domain of the organizer, or one derived from the PRODID
- use Ical\Exceptions\IcalendarException;
- /**
- * Port building the VTIMEZONE of a TZID from a timezone database, for the events using it.
- */
- interface TimezoneDefinitionProvider
- {
- /**
- * @param int $from first instant (Unix timestamp) rendered with the timezone
- * @param int|null $to last instant, null when an event recurs forever: the rules still applied then recur without end
- *
- use Ical\Exceptions\IcalendarException;
- /**
- * Port writing a calendar in a file format, e.g. the iCalendar text format of RFC 5545.
- */
- interface CalendarSerializer
- {
- /**
- * @throws IcalendarException when the document cannot be written, e.g. an event is not valid or a text is not UTF-8
- */
- public function serialize(CalendarDocument $document): string;