Skip to content

Commit

Permalink
adding return annotations to supress warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
RanVaknin committed Oct 7, 2024
1 parent fb50991 commit cbdb805
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Api/Parser/DecodingEventStreamIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ public function key()
return $this->key;
}

/**
* @return void
*/
#[\ReturnTypeWillChange]
public function next()
{
Expand All @@ -202,6 +205,9 @@ public function next()
}
}

/**
* @return void
*/
#[\ReturnTypeWillChange]
public function rewind()
{
Expand Down
12 changes: 12 additions & 0 deletions src/ResultPaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,27 @@ public function current()
return $this->valid() ? $this->result : false;
}

/**
* @return mixed
*/
#[\ReturnTypeWillChange]
public function key()
{
return $this->valid() ? $this->requestCount - 1 : null;
}

/**
* @return void
*/
#[\ReturnTypeWillChange]
public function next()
{
$this->result = null;
}

/**
* @return bool
*/
#[\ReturnTypeWillChange]
public function valid()
{
Expand Down Expand Up @@ -154,6 +163,9 @@ public function valid()
return false;
}

/**
* @return void
*/
#[\ReturnTypeWillChange]
public function rewind()
{
Expand Down

0 comments on commit cbdb805

Please sign in to comment.