Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
49 | public function extract(array $data): DatePeriod |
||
50 | { |
||
51 | $year = $data['year']; |
||
52 | $yearTo = $year + $this->numberOfYearsOn; |
||
53 | $weekDay = $data['weekDay']; |
||
54 | |||
55 | return new DatePeriod( |
||
56 | new DateTime("first $weekDay of $year-{$this->monthToCover[0]}"), |
||
57 | DateInterval::createFromDateString("next $weekDay"), |
||
58 | new DateTime("last day of $yearTo-{$this->monthToCover[1]}") |
||
59 | ); |
||
62 |