Lines
n/a
0 / 0
Functions and Methods
n/a
0 / 0
Classes and Traits
n/a
0 / 0
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Contracts\Sun; | |
| 6 | ||
| 7 | use DateTimeImmutable; | |
| 8 | use Stewart\Contracts\Exception\SunException; | |
| 9 | use Stewart\Contracts\Time\Instant; | |
| 10 | use Stewart\Contracts\Time\SunOffset; | |
| 11 | ||
| 12 | interface SunCalendar | |
| 13 | { | |
| 14 | /** @throws SunException */ | |
| 15 | public function getLocation(): GeoLocation; | |
| 16 | ||
| 17 | /** @throws SunException */ | |
| 18 | public function findNextEvent(SunEvent $event, ?SunOffset $offset = null, ?Instant $after = null): ?Instant; | |
| 19 | ||
| 20 | /** @throws SunException */ | |
| 21 | public function getDayOn(DateTimeImmutable $day): SunDay; | |
| 22 | ||
| 23 | /** @throws SunException */ | |
| 24 | public function getPositionAt(Instant $moment): SunPosition; | |
| 25 | ||
| 26 | /** @throws SunException */ | |
| 27 | public function getCurrentPosition(): SunPosition; | |
| 28 | ||
| 29 | /** @throws SunException */ | |
| 30 | public function isSunUp(): bool; | |
| 31 | } |