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 6, 2024
1 parent 9e0ac04 commit 1da6015
Show file tree
Hide file tree
Showing 8 changed files with 27 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()
{ }
}
5 changes: 5 additions & 0 deletions lib/Doctrine/Node/MaterializedPath/LevelOrderIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,31 @@ public function __construct($node, $opts)
throw new Doctrine_Exception('Not yet implemented');
}

#[\ReturnTypeWillChange]
public function rewind()
{
throw new Doctrine_Exception('Not yet implemented');
}

#[\ReturnTypeWillChange]
public function valid()
{
throw new Doctrine_Exception('Not yet implemented');
}

#[\ReturnTypeWillChange]
public function current()
{
throw new Doctrine_Exception('Not yet implemented');
}

#[\ReturnTypeWillChange]
public function key()
{
throw new Doctrine_Exception('Not yet implemented');
}

#[\ReturnTypeWillChange]
public function next()
{
throw new Doctrine_Exception('Not yet implemented');
Expand Down
5 changes: 5 additions & 0 deletions lib/Doctrine/Node/MaterializedPath/PostOrderIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,31 @@ public function __construct($node, $opts)
throw new Doctrine_Exception('Not yet implemented');
}

#[\ReturnTypeWillChange]
public function rewind()
{
throw new Doctrine_Exception('Not yet implemented');
}

#[\ReturnTypeWillChange]
public function valid()
{
throw new Doctrine_Exception('Not yet implemented');
}

#[\ReturnTypeWillChange]
public function current()
{
throw new Doctrine_Exception('Not yet implemented');
}

#[\ReturnTypeWillChange]
public function key()
{
throw new Doctrine_Exception('Not yet implemented');
}

#[\ReturnTypeWillChange]
public function next()
{
throw new Doctrine_Exception('Not yet implemented');
Expand Down
5 changes: 5 additions & 0 deletions lib/Doctrine/Node/MaterializedPath/PreOrderIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,31 @@ public function __construct($node, $opts)
throw new Doctrine_Exception('Not yet implemented');
}

#[\ReturnTypeWillChange]
public function rewind()
{
throw new Doctrine_Exception('Not yet implemented');
}

#[\ReturnTypeWillChange]
public function valid()
{
throw new Doctrine_Exception('Not yet implemented');
}

#[\ReturnTypeWillChange]
public function current()
{
throw new Doctrine_Exception('Not yet implemented');
}

#[\ReturnTypeWillChange]
public function key()
{
throw new Doctrine_Exception('Not yet implemented');
}

#[\ReturnTypeWillChange]
public function next()
{
throw new Doctrine_Exception('Not yet implemented');
Expand Down
5 changes: 5 additions & 0 deletions lib/Doctrine/Node/NestedSet/PreOrderIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public function __construct($record, $opts)
*
* @return void
*/
#[\ReturnTypeWillChange]
public function rewind()
{
$this->index = -1;
Expand All @@ -111,6 +112,7 @@ public function rewind()
*
* @return integer
*/
#[\ReturnTypeWillChange]
public function key()
{
return $this->key;
Expand All @@ -121,6 +123,7 @@ public function key()
*
* @return Doctrine_Record
*/
#[\ReturnTypeWillChange]
public function current()
{
$record = $this->collection->get($this->key);
Expand All @@ -133,6 +136,7 @@ public function current()
*
* @return void
*/
#[\ReturnTypeWillChange]
public function next()
{
while ($current = $this->advanceIndex()) {
Expand All @@ -149,6 +153,7 @@ public function next()
/**
* @return boolean whether or not the iteration will continue
*/
#[\ReturnTypeWillChange]
public function valid()
{
return ($this->index < $this->count);
Expand Down

0 comments on commit 1da6015

Please sign in to comment.