1 | <?php |
||
22 | class DateRange |
||
23 | { |
||
24 | /** @var \DateTimeInterface */ |
||
25 | private $since; |
||
26 | |||
27 | /** @var \DateTimeInterface */ |
||
28 | private $till; |
||
29 | |||
30 | /** |
||
31 | * @param \DateTimeInterface $since |
||
32 | * @param \DateTimeInterface $till |
||
33 | */ |
||
34 | public function __construct(\DateTimeInterface $since, \DateTimeInterface $till) |
||
39 | |||
40 | /** |
||
41 | * @return \DateTimeInterface |
||
42 | */ |
||
43 | public function getSince(): \DateTimeInterface |
||
47 | |||
48 | /** |
||
49 | * @param \DateTimeInterface $since |
||
50 | * |
||
51 | * @return $this |
||
52 | */ |
||
53 | public function setSince(\DateTimeInterface $since): self |
||
59 | |||
60 | /** |
||
61 | * @return \DateTimeInterface |
||
62 | */ |
||
63 | public function getTill(): \DateTimeInterface |
||
67 | |||
68 | /** |
||
69 | * @param \DateTimeInterface $till |
||
70 | * |
||
71 | * @return $this |
||
72 | */ |
||
73 | public function setTill(\DateTimeInterface $till): self |
||
79 | |||
80 | /** |
||
81 | * @throws LogicException |
||
82 | */ |
||
83 | public function assertSameTimezones(): void |
||
89 | } |
||
90 |