aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/Recur
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-02-11 09:21:19 +0000
committerMario <mario@mariovavti.com>2022-02-11 09:21:19 +0000
commit6d8aabab2347feabdd804b609dcd4513f09f78d4 (patch)
tree9bea1aba6caa85084ec664f498c445bb92d9457c /vendor/sabre/vobject/lib/Recur
parente74359fcfe4d97efe72a811b45526a69edae3893 (diff)
downloadvolse-hubzilla-6d8aabab2347feabdd804b609dcd4513f09f78d4.tar.gz
volse-hubzilla-6d8aabab2347feabdd804b609dcd4513f09f78d4.tar.bz2
volse-hubzilla-6d8aabab2347feabdd804b609dcd4513f09f78d4.zip
composer libs minor version updates
Diffstat (limited to 'vendor/sabre/vobject/lib/Recur')
-rw-r--r--vendor/sabre/vobject/lib/Recur/EventIterator.php17
-rw-r--r--vendor/sabre/vobject/lib/Recur/RDateIterator.php9
-rw-r--r--vendor/sabre/vobject/lib/Recur/RRuleIterator.php9
3 files changed, 33 insertions, 2 deletions
diff --git a/vendor/sabre/vobject/lib/Recur/EventIterator.php b/vendor/sabre/vobject/lib/Recur/EventIterator.php
index e42ca1360..61f05d7de 100644
--- a/vendor/sabre/vobject/lib/Recur/EventIterator.php
+++ b/vendor/sabre/vobject/lib/Recur/EventIterator.php
@@ -198,6 +198,7 @@ class EventIterator implements \Iterator
*
* @return DateTimeImmutable
*/
+ #[\ReturnTypeWillChange]
public function current()
{
if ($this->currentDate) {
@@ -229,9 +230,13 @@ class EventIterator implements \Iterator
if (!$this->valid()) {
return;
}
- $end = clone $this->currentDate;
+ if ($this->currentOverriddenEvent && $this->currentOverriddenEvent->DTEND) {
+ return $this->currentOverriddenEvent->DTEND->getDateTime($this->timeZone);
+ } else {
+ $end = clone $this->currentDate;
- return $end->modify('+'.$this->eventDuration.' seconds');
+ return $end->modify('+'.$this->eventDuration.' seconds');
+ }
}
/**
@@ -281,6 +286,7 @@ class EventIterator implements \Iterator
*
* @return int
*/
+ #[\ReturnTypeWillChange]
public function key()
{
// The counter is always 1 ahead.
@@ -293,6 +299,7 @@ class EventIterator implements \Iterator
*
* @return bool
*/
+ #[\ReturnTypeWillChange]
public function valid()
{
if ($this->counter > Settings::$maxRecurrences && -1 !== Settings::$maxRecurrences) {
@@ -304,7 +311,10 @@ class EventIterator implements \Iterator
/**
* Sets the iterator back to the starting point.
+ *
+ * @return void
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
$this->recurIterator->rewind();
@@ -327,7 +337,10 @@ class EventIterator implements \Iterator
/**
* Advances the iterator with one step.
+ *
+ * @return void
*/
+ #[\ReturnTypeWillChange]
public function next()
{
$this->currentOverriddenEvent = null;
diff --git a/vendor/sabre/vobject/lib/Recur/RDateIterator.php b/vendor/sabre/vobject/lib/Recur/RDateIterator.php
index d117e152c..5d56657fa 100644
--- a/vendor/sabre/vobject/lib/Recur/RDateIterator.php
+++ b/vendor/sabre/vobject/lib/Recur/RDateIterator.php
@@ -35,6 +35,7 @@ class RDateIterator implements Iterator
/* Implementation of the Iterator interface {{{ */
+ #[\ReturnTypeWillChange]
public function current()
{
if (!$this->valid()) {
@@ -49,6 +50,7 @@ class RDateIterator implements Iterator
*
* @return int
*/
+ #[\ReturnTypeWillChange]
public function key()
{
return $this->counter;
@@ -60,6 +62,7 @@ class RDateIterator implements Iterator
*
* @return bool
*/
+ #[\ReturnTypeWillChange]
public function valid()
{
return $this->counter <= count($this->dates);
@@ -67,7 +70,10 @@ class RDateIterator implements Iterator
/**
* Resets the iterator.
+ *
+ * @return void
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
$this->currentDate = clone $this->startDate;
@@ -76,7 +82,10 @@ class RDateIterator implements Iterator
/**
* Goes on to the next iteration.
+ *
+ * @return void
*/
+ #[\ReturnTypeWillChange]
public function next()
{
++$this->counter;
diff --git a/vendor/sabre/vobject/lib/Recur/RRuleIterator.php b/vendor/sabre/vobject/lib/Recur/RRuleIterator.php
index 0511f0ade..d556aa6c3 100644
--- a/vendor/sabre/vobject/lib/Recur/RRuleIterator.php
+++ b/vendor/sabre/vobject/lib/Recur/RRuleIterator.php
@@ -38,6 +38,7 @@ class RRuleIterator implements Iterator
/* Implementation of the Iterator interface {{{ */
+ #[\ReturnTypeWillChange]
public function current()
{
if (!$this->valid()) {
@@ -52,6 +53,7 @@ class RRuleIterator implements Iterator
*
* @return int
*/
+ #[\ReturnTypeWillChange]
public function key()
{
return $this->counter;
@@ -64,6 +66,7 @@ class RRuleIterator implements Iterator
*
* @return bool
*/
+ #[\ReturnTypeWillChange]
public function valid()
{
if (null === $this->currentDate) {
@@ -78,7 +81,10 @@ class RRuleIterator implements Iterator
/**
* Resets the iterator.
+ *
+ * @return void
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
$this->currentDate = clone $this->startDate;
@@ -87,7 +93,10 @@ class RRuleIterator implements Iterator
/**
* Goes on to the next iteration.
+ *
+ * @return void
*/
+ #[\ReturnTypeWillChange]
public function next()
{
// Otherwise, we find the next event in the normal RRULE