Total Complexity | 2 |
Total Lines | 12 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class YearPeriod extends Period |
||
21 | { |
||
22 | public function countPeriodsPassed(DateTimeImmutable $since, DateTimeImmutable $time): float |
||
23 | { |
||
24 | $diff = $time->diff($since); |
||
25 | |||
26 | return $diff->y / $this->value; |
||
27 | } |
||
28 | |||
29 | public function addTo(DateTimeImmutable $since): DateTimeImmutable |
||
32 | } |
||
33 | } |
||
34 |