| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 41 | public function __construct(DateTimeInterface $from, DateTimeInterface $to) |
||
| 42 | { |
||
| 43 | if ($from > $to) { |
||
| 44 | throw RequestException::invalidPersonalStatementPeriod(); |
||
| 45 | } |
||
| 46 | |||
| 47 | $diffInSeconds = $to->getTimestamp() - $from->getTimestamp(); |
||
| 48 | |||
| 49 | if ($diffInSeconds > self::MAX_PERIOD_IN_SECONDS) { |
||
| 50 | throw RequestException::maxPersonalStatementPeriod(); |
||
| 51 | } |
||
| 52 | |||
| 53 | $this->from = $from; |
||
| 54 | $this->to = $to; |
||
| 55 | } |
||
| 93 |