Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
17 | 29 | public function __construct( |
|
18 | PointInTimeInterface $start, |
||
19 | PointInTimeInterface $end |
||
20 | ) { |
||
21 | 29 | if ($start->aheadOf($end)) { |
|
22 | 1 | throw new LogicException; |
|
23 | } |
||
24 | |||
25 | 28 | if ($start->equals($end)) { |
|
26 | 1 | throw new EmptySlot; |
|
27 | } |
||
28 | |||
29 | 27 | $this->start = $start; |
|
30 | 27 | $this->end = $end; |
|
31 | 27 | } |
|
80 |