Skip to content

Commit 8caf97e

Browse files
committed
fix: add #[ReturnTypeWillChange] attributes where needed
`IteratorAggregate::getIterator()` definitions Signed-off-by: Matthew Weier O'Phinney <[email protected]>
1 parent 4cab209 commit 8caf97e

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

src/Api.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use ArrayIterator;
66
use IteratorAggregate;
7+
use ReturnTypeWillChange;
78

89
//use Laminas\ApiTools\ContentNegotiation\ViewModel;
910

@@ -110,6 +111,7 @@ public function toArray()
110111
*
111112
* @return ArrayIterator
112113
*/
114+
#[ReturnTypeWillChange]
113115
public function getIterator()
114116
{
115117
return new ArrayIterator($this->toArray());

src/Field.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use ArrayIterator;
66
use IteratorAggregate;
7+
use ReturnTypeWillChange;
78

89
class Field implements IteratorAggregate
910
{
@@ -146,6 +147,7 @@ public function toArray()
146147
*
147148
* @return ArrayIterator
148149
*/
150+
#[ReturnTypeWillChange]
149151
public function getIterator()
150152
{
151153
return new ArrayIterator($this->toArray());

src/Operation.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use ArrayIterator;
66
use IteratorAggregate;
7+
use ReturnTypeWillChange;
78

89
class Operation implements IteratorAggregate
910
{
@@ -158,6 +159,7 @@ public function toArray()
158159
*
159160
* @return ArrayIterator
160161
*/
162+
#[ReturnTypeWillChange]
161163
public function getIterator()
162164
{
163165
return new ArrayIterator($this->toArray());

src/Service.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use ArrayIterator;
66
use IteratorAggregate;
77
use Laminas\ApiTools\Documentation\Api;
8+
use ReturnTypeWillChange;
89

910
class Service implements IteratorAggregate
1011
{
@@ -287,6 +288,7 @@ public function toArray()
287288
*
288289
* @return ArrayIterator
289290
*/
291+
#[ReturnTypeWillChange]
290292
public function getIterator()
291293
{
292294
return new ArrayIterator($this->toArray());

0 commit comments

Comments
 (0)