Skip to content

Commit 875e787

Browse files
committed
fix: Solve return type issues with Objectiterator (port of #682)
See #682
1 parent 77cad15 commit 875e787

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/JsonSchema/Iterator/ObjectIterator.php

+6-5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function __construct($object)
3939
/**
4040
* {@inheritdoc}
4141
*/
42+
#[\ReturnTypeWillChange]
4243
public function current()
4344
{
4445
$this->initialize();
@@ -49,7 +50,7 @@ public function current()
4950
/**
5051
* {@inheritdoc}
5152
*/
52-
public function next()
53+
public function next(): void
5354
{
5455
$this->initialize();
5556
$this->position++;
@@ -58,7 +59,7 @@ public function next()
5859
/**
5960
* {@inheritdoc}
6061
*/
61-
public function key()
62+
public function key(): int
6263
{
6364
$this->initialize();
6465

@@ -68,7 +69,7 @@ public function key()
6869
/**
6970
* {@inheritdoc}
7071
*/
71-
public function valid()
72+
public function valid(): bool
7273
{
7374
$this->initialize();
7475

@@ -78,7 +79,7 @@ public function valid()
7879
/**
7980
* {@inheritdoc}
8081
*/
81-
public function rewind()
82+
public function rewind(): void
8283
{
8384
$this->initialize();
8485
$this->position = 0;
@@ -87,7 +88,7 @@ public function rewind()
8788
/**
8889
* {@inheritdoc}
8990
*/
90-
public function count()
91+
public function count(): int
9192
{
9293
$this->initialize();
9394

0 commit comments

Comments
 (0)