| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function estimatePeriodEndAt(Recurrence $recurrence) |
||
| 18 | { |
||
| 19 | $periodEndAt = $recurrence->getPeriodEndAt(); |
||
| 20 | |||
| 21 | if ($recurrence->hasCount()) { |
||
| 22 | $periodEndAt = clone $recurrence->getPeriodStartAt(); |
||
| 23 | $periodEndAt->modify(str_replace('1', ($recurrence->getCount()*$recurrence->getInterval()), $recurrence->getFrequency()->convertToDateTimeFormat())); |
||
| 24 | } |
||
| 25 | |||
| 26 | return $periodEndAt; |
||
| 27 | } |
||
| 28 | |||
| 35 |