Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
27 | 14 | public function __construct(DateTimeInterface $startDate, DateTimeInterface $endDate) |
|
28 | { |
||
29 | 14 | if ($endDate <= $startDate) { |
|
30 | 2 | throw new DateRangeException('Invalid end date, must be after start'); |
|
31 | } |
||
32 | |||
33 | 14 | $this->startDate = $startDate; |
|
34 | 14 | $this->endDate = $endDate; |
|
35 | } |
||
85 |