| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | 9 | public function getPeriod($interval = 'P1D', DateTimeImmutable $start = null, DateTimeImmutable $end = null): DatePeriod |
|
| 32 | { |
||
| 33 | 9 | if (null === $start) { |
|
| 34 | 9 | $start = $this->start; |
|
| 35 | 9 | } |
|
| 36 | 9 | ||
| 37 | if (null === $end) { |
||
| 38 | 9 | $end = $this->end; |
|
| 39 | 9 | } |
|
| 40 | 9 | ||
| 41 | 9 | return new DatePeriod($start, new DateInterval($interval), $end); |
|
| 42 | } |
||
| 43 | 9 | ||
| 91 |