Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
30 | 9 | public function __construct(DateTimeInterface $startDate, DateTimeInterface $endDate) |
|
31 | { |
||
32 | 9 | if ($startDate > $endDate) { |
|
33 | 1 | throw new InvalidArgumentException('The start date must be more recent that end date'); |
|
34 | } |
||
35 | |||
36 | 8 | $this->startDate = $this->makeImmutable($startDate); |
|
37 | 8 | $this->endDate = $this->makeImmutable($endDate); |
|
38 | 8 | } |
|
67 |