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