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
3declare(strict_types=1);
4
5namespace Stewart\Contracts\Sun;
6
7use DateTimeImmutable;
8use Stewart\Contracts\Exception\SunException;
9use Stewart\Contracts\Time\Instant;
10use Stewart\Contracts\Time\SunOffset;
11
12interface 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}