| Total Complexity | 6 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | final class UndefinedRange extends RangeState |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * {@inheritdoc} |
||
| 15 | */ |
||
| 16 | 2 | public function getStartDate(): DateTimeInterface |
|
| 17 | { |
||
| 18 | 2 | throw new DateRangeException('Range start is undefined'); |
|
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * {@inheritdoc} |
||
| 23 | */ |
||
| 24 | 2 | public function getEndDate(): DateTimeInterface |
|
| 25 | { |
||
| 26 | 2 | throw new DateRangeException('Range end is undefined'); |
|
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * {@inheritdoc} |
||
| 31 | */ |
||
| 32 | 10 | public function setStartDate(DateTimeInterface $start): RangeState |
|
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | 3 | public function setEndDate(DateTimeInterface $end): RangeState |
|
| 41 | { |
||
| 42 | 3 | return new InfiniteStartRange($end); |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * {@inheritdoc} |
||
| 47 | */ |
||
| 48 | 1 | public function formatStartDate(string $format = 'c'): ?string |
|
| 49 | { |
||
| 50 | 1 | return null; |
|
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * {@inheritdoc} |
||
| 55 | */ |
||
| 56 | 1 | public function formatEndDate(string $format = 'c'): ?string |
|
| 59 | } |
||
| 60 | } |
||
| 61 |