Skip to content

Commit

Permalink
PHP 8.1 > ReturnTypeWillChange attributes added
Browse files Browse the repository at this point in the history
  • Loading branch information
thirsch committed Feb 3, 2024
1 parent 7327db8 commit 375f790
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Doctrine/Collection/Iterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function __construct($collection)
*
* @return void
*/
#[\ReturnTypeWillChange]
public function rewind()
{
$this->index = 0;
Expand All @@ -88,6 +89,7 @@ public function rewind()
*
* @return integer
*/
#[\ReturnTypeWillChange]
public function key()
{
return $this->key;
Expand All @@ -98,6 +100,7 @@ public function key()
*
* @return Doctrine_Record
*/
#[\ReturnTypeWillChange]
public function current()
{
return $this->collection->get($this->key);
Expand All @@ -108,6 +111,7 @@ public function current()
*
* @return void
*/
#[\ReturnTypeWillChange]
public function next()
{
$this->index++;
Expand Down
1 change: 1 addition & 0 deletions lib/Doctrine/Collection/Iterator/Expandable.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
*/
class Doctrine_Collection_Iterator_Expandable extends Doctrine_Collection_Iterator
{
#[\ReturnTypeWillChange]
public function valid()
{
if ($this->index < $this->count) {
Expand Down
1 change: 1 addition & 0 deletions lib/Doctrine/Collection/Iterator/Normal.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Doctrine_Collection_Iterator_Normal extends Doctrine_Collection_Iterator
/**
* @return boolean whether or not the iteration will continue
*/
#[\ReturnTypeWillChange]
public function valid()
{
return ($this->index < $this->count);
Expand Down
1 change: 1 addition & 0 deletions lib/Doctrine/Collection/Iterator/Offset.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
*/
class Doctrine_Collection_Iterator_Offset extends Doctrine_Collection_Iterator
{
#[\ReturnTypeWillChange]
public function valid()
{ }
}

0 comments on commit 375f790

Please sign in to comment.