|
@@ 61-63 (lines=3) @@
|
| 58 |
|
throw new \InvalidArgumentException(sprintf('Recurrence [%s] option is required', FreqTransformer::RRULE_PARAMETER)); |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
if ($recurrence->hasCount() && $recurrence->getPeriodEndAt()) { |
| 62 |
|
throw new \InvalidArgumentException(sprintf('Recurrence cannot have [%s] and [%s] option at the same time', UntilTransformer::RRULE_PARAMETER, CountTransformer::RRULE_PARAMETER)); |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
if (!$recurrence->hasCount() && !$recurrence->getPeriodEndAt()) { |
| 66 |
|
throw new \InvalidArgumentException(sprintf('Recurrence required an [%s] or [%s] option', UntilTransformer::RRULE_PARAMETER, CountTransformer::RRULE_PARAMETER)); |
|
@@ 65-67 (lines=3) @@
|
| 62 |
|
throw new \InvalidArgumentException(sprintf('Recurrence cannot have [%s] and [%s] option at the same time', UntilTransformer::RRULE_PARAMETER, CountTransformer::RRULE_PARAMETER)); |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
if (!$recurrence->hasCount() && !$recurrence->getPeriodEndAt()) { |
| 66 |
|
throw new \InvalidArgumentException(sprintf('Recurrence required an [%s] or [%s] option', UntilTransformer::RRULE_PARAMETER, CountTransformer::RRULE_PARAMETER)); |
| 67 |
|
} |
| 68 |
|
|
| 69 |
|
return $recurrence; |
| 70 |
|
} |