| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function getRecurrences(DateTimeInterface $from, DateTimeInterface $to, $inc = true) |
||
| 27 | 11 | { |
|
| 28 | 11 | $rRule = new RecurrRule($this->getRrule(), $this->getStartDate()); |
|
| 29 | 11 | $rRuleTransformer = new ArrayTransformer(); |
|
| 30 | $constraint = new BetweenConstraint($from, $to, $inc); |
||
| 31 | $recurrenceCollection = $rRuleTransformer->transform($rRule, $constraint); |
||
| 32 | $result = []; |
||
| 33 | /** @var Recurrence $recurrence */ |
||
| 34 | 15 | foreach ($recurrenceCollection as $recurrence) { |
|
| 35 | $result[] = $recurrence->getStart(); |
||
| 36 | 15 | } |
|
| 37 | return $result; |
||
| 38 | } |
||
| 39 | } |