Skip to content

Commit 1da6015

Browse files
committed
PHP 8.1 > ReturnTypeWillChange attributes added
1 parent 9e0ac04 commit 1da6015

File tree

8 files changed

+27
-0
lines changed

8 files changed

+27
-0
lines changed

lib/Doctrine/Collection/Iterator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public function __construct($collection)
7474
*
7575
* @return void
7676
*/
77+
#[\ReturnTypeWillChange]
7778
public function rewind()
7879
{
7980
$this->index = 0;
@@ -88,6 +89,7 @@ public function rewind()
8889
*
8990
* @return integer
9091
*/
92+
#[\ReturnTypeWillChange]
9193
public function key()
9294
{
9395
return $this->key;
@@ -98,6 +100,7 @@ public function key()
98100
*
99101
* @return Doctrine_Record
100102
*/
103+
#[\ReturnTypeWillChange]
101104
public function current()
102105
{
103106
return $this->collection->get($this->key);
@@ -108,6 +111,7 @@ public function current()
108111
*
109112
* @return void
110113
*/
114+
#[\ReturnTypeWillChange]
111115
public function next()
112116
{
113117
$this->index++;

lib/Doctrine/Collection/Iterator/Expandable.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
*/
3333
class Doctrine_Collection_Iterator_Expandable extends Doctrine_Collection_Iterator
3434
{
35+
#[\ReturnTypeWillChange]
3536
public function valid()
3637
{
3738
if ($this->index < $this->count) {

lib/Doctrine/Collection/Iterator/Normal.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class Doctrine_Collection_Iterator_Normal extends Doctrine_Collection_Iterator
3535
/**
3636
* @return boolean whether or not the iteration will continue
3737
*/
38+
#[\ReturnTypeWillChange]
3839
public function valid()
3940
{
4041
return ($this->index < $this->count);

lib/Doctrine/Collection/Iterator/Offset.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
*/
3333
class Doctrine_Collection_Iterator_Offset extends Doctrine_Collection_Iterator
3434
{
35+
#[\ReturnTypeWillChange]
3536
public function valid()
3637
{ }
3738
}

lib/Doctrine/Node/MaterializedPath/LevelOrderIterator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,31 @@ public function __construct($node, $opts)
4141
throw new Doctrine_Exception('Not yet implemented');
4242
}
4343

44+
#[\ReturnTypeWillChange]
4445
public function rewind()
4546
{
4647
throw new Doctrine_Exception('Not yet implemented');
4748
}
4849

50+
#[\ReturnTypeWillChange]
4951
public function valid()
5052
{
5153
throw new Doctrine_Exception('Not yet implemented');
5254
}
5355

56+
#[\ReturnTypeWillChange]
5457
public function current()
5558
{
5659
throw new Doctrine_Exception('Not yet implemented');
5760
}
5861

62+
#[\ReturnTypeWillChange]
5963
public function key()
6064
{
6165
throw new Doctrine_Exception('Not yet implemented');
6266
}
6367

68+
#[\ReturnTypeWillChange]
6469
public function next()
6570
{
6671
throw new Doctrine_Exception('Not yet implemented');

lib/Doctrine/Node/MaterializedPath/PostOrderIterator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,31 @@ public function __construct($node, $opts)
4141
throw new Doctrine_Exception('Not yet implemented');
4242
}
4343

44+
#[\ReturnTypeWillChange]
4445
public function rewind()
4546
{
4647
throw new Doctrine_Exception('Not yet implemented');
4748
}
4849

50+
#[\ReturnTypeWillChange]
4951
public function valid()
5052
{
5153
throw new Doctrine_Exception('Not yet implemented');
5254
}
5355

56+
#[\ReturnTypeWillChange]
5457
public function current()
5558
{
5659
throw new Doctrine_Exception('Not yet implemented');
5760
}
5861

62+
#[\ReturnTypeWillChange]
5963
public function key()
6064
{
6165
throw new Doctrine_Exception('Not yet implemented');
6266
}
6367

68+
#[\ReturnTypeWillChange]
6469
public function next()
6570
{
6671
throw new Doctrine_Exception('Not yet implemented');

lib/Doctrine/Node/MaterializedPath/PreOrderIterator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,31 @@ public function __construct($node, $opts)
4141
throw new Doctrine_Exception('Not yet implemented');
4242
}
4343

44+
#[\ReturnTypeWillChange]
4445
public function rewind()
4546
{
4647
throw new Doctrine_Exception('Not yet implemented');
4748
}
4849

50+
#[\ReturnTypeWillChange]
4951
public function valid()
5052
{
5153
throw new Doctrine_Exception('Not yet implemented');
5254
}
5355

56+
#[\ReturnTypeWillChange]
5457
public function current()
5558
{
5659
throw new Doctrine_Exception('Not yet implemented');
5760
}
5861

62+
#[\ReturnTypeWillChange]
5963
public function key()
6064
{
6165
throw new Doctrine_Exception('Not yet implemented');
6266
}
6367

68+
#[\ReturnTypeWillChange]
6469
public function next()
6570
{
6671
throw new Doctrine_Exception('Not yet implemented');

lib/Doctrine/Node/NestedSet/PreOrderIterator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ public function __construct($record, $opts)
100100
*
101101
* @return void
102102
*/
103+
#[\ReturnTypeWillChange]
103104
public function rewind()
104105
{
105106
$this->index = -1;
@@ -111,6 +112,7 @@ public function rewind()
111112
*
112113
* @return integer
113114
*/
115+
#[\ReturnTypeWillChange]
114116
public function key()
115117
{
116118
return $this->key;
@@ -121,6 +123,7 @@ public function key()
121123
*
122124
* @return Doctrine_Record
123125
*/
126+
#[\ReturnTypeWillChange]
124127
public function current()
125128
{
126129
$record = $this->collection->get($this->key);
@@ -133,6 +136,7 @@ public function current()
133136
*
134137
* @return void
135138
*/
139+
#[\ReturnTypeWillChange]
136140
public function next()
137141
{
138142
while ($current = $this->advanceIndex()) {
@@ -149,6 +153,7 @@ public function next()
149153
/**
150154
* @return boolean whether or not the iteration will continue
151155
*/
156+
#[\ReturnTypeWillChange]
152157
public function valid()
153158
{
154159
return ($this->index < $this->count);

0 commit comments

Comments
 (0)