diff options
Diffstat (limited to 'vendor/sabre/vobject/lib/Recur/RRuleIterator.php')
-rw-r--r-- | vendor/sabre/vobject/lib/Recur/RRuleIterator.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/vendor/sabre/vobject/lib/Recur/RRuleIterator.php b/vendor/sabre/vobject/lib/Recur/RRuleIterator.php index 75342a2a8..55581e9ac 100644 --- a/vendor/sabre/vobject/lib/Recur/RRuleIterator.php +++ b/vendor/sabre/vobject/lib/Recur/RRuleIterator.php @@ -27,8 +27,7 @@ class RRuleIterator implements Iterator /** * Creates the Iterator. * - * @param string|array $rrule - * @param DateTimeInterface $start + * @param string|array $rrule */ public function __construct($rrule, DateTimeInterface $start) { @@ -132,8 +131,6 @@ class RRuleIterator implements Iterator /** * This method allows you to quickly go to the next occurrence after the * specified date. - * - * @param DateTimeInterface $dt */ public function fastForward(DateTimeInterface $dt) { @@ -232,7 +229,7 @@ class RRuleIterator implements Iterator * * This is an array of weekdays * - * This may also be preceeded by a positive or negative integer. If present, + * This may also be preceded by a positive or negative integer. If present, * this indicates the nth occurrence of a specific day within the monthly or * yearly rrule. For instance, -2TU indicates the second-last tuesday of * the month, or year. @@ -325,14 +322,17 @@ class RRuleIterator implements Iterator return; } + $recurrenceHours = []; if (!empty($this->byHour)) { $recurrenceHours = $this->getHours(); } + $recurrenceDays = []; if (!empty($this->byDay)) { $recurrenceDays = $this->getDays(); } + $recurrenceMonths = []; if (!empty($this->byMonth)) { $recurrenceMonths = $this->getMonths(); } @@ -375,10 +375,12 @@ class RRuleIterator implements Iterator return; } + $recurrenceHours = []; if ($this->byHour) { $recurrenceHours = $this->getHours(); } + $recurrenceDays = []; if ($this->byDay) { $recurrenceDays = $this->getDays(); } @@ -439,6 +441,7 @@ class RRuleIterator implements Iterator return; } + $occurrence = -1; while (true) { $occurrences = $this->getMonthlyOccurrences(); @@ -608,6 +611,7 @@ class RRuleIterator implements Iterator // If we got a byDay or getMonthDay filter, we must first expand // further. if ($this->byDay || $this->byMonthDay) { + $occurrence = -1; while (true) { $occurrences = $this->getMonthlyOccurrences(); @@ -771,7 +775,7 @@ class RRuleIterator implements Iterator $this->byMonth = (array) $value; foreach ($this->byMonth as $byMonth) { if (!is_numeric($byMonth) || (int) $byMonth < 1 || (int) $byMonth > 12) { - throw new InvalidDataException('BYMONTH in RRULE must have value(s) betweeen 1 and 12!'); + throw new InvalidDataException('BYMONTH in RRULE must have value(s) between 1 and 12!'); } } break; @@ -948,7 +952,7 @@ class RRuleIterator implements Iterator { $recurrenceDays = []; foreach ($this->byDay as $byDay) { - // The day may be preceeded with a positive (+n) or + // The day may be preceded with a positive (+n) or // negative (-n) integer. However, this does not make // sense in 'weekly' so we ignore it here. $recurrenceDays[] = $this->dayMap[substr($byDay, -2)]; |