| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 54 | 13 | public function getRecurrences(DateTimeInterface $from, DateTimeInterface $to, $inc = true) |
|
| 55 | { |
||
| 56 | 13 | $rRule = new RecurrRule($this->getRrule(), $this->getStartDate()); |
|
| 57 | 13 | $rRuleTransformer = new ArrayTransformer(); |
|
| 58 | 13 | $recurrenceCollection = $rRuleTransformer->transform($rRule)->startsBetween($from, $to, $inc); |
|
| 59 | 13 | $result = []; |
|
| 60 | /** @var Recurrence $recurrence */ |
||
| 61 | 13 | foreach ($recurrenceCollection as $recurrence) { |
|
| 62 | 12 | $result[] =$recurrence->getStart(); |
|
| 63 | } |
||
| 64 | 13 | return $result; |
|
| 65 | } |
||
| 66 | } |