Skip to content

Commit d44e0b7

Browse files
committed
Fix return types for PHP 8.1
1 parent c3cb73a commit d44e0b7

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

Tests/Validator/Constraints/UniqueEntityValidatorTest.php

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,10 @@ public function resultWithEmptyIterator(): array
827827

828828
return [
829829
[$entity, new class() implements \Iterator {
830+
/**
831+
* @return mixed
832+
*/
833+
#[\ReturnTypeWillChange]
830834
public function current()
831835
{
832836
return null;
@@ -837,19 +841,28 @@ public function valid(): bool
837841
return false;
838842
}
839843

840-
public function next()
844+
public function next(): void
841845
{
842846
}
843847

848+
/**
849+
* @return mixed
850+
*/
851+
#[\ReturnTypeWillChange]
844852
public function key()
845853
{
854+
return false;
846855
}
847856

848-
public function rewind()
857+
public function rewind(): void
849858
{
850859
}
851860
}],
852861
[$entity, new class() implements \Iterator {
862+
/**
863+
* @return mixed
864+
*/
865+
#[\ReturnTypeWillChange]
853866
public function current()
854867
{
855868
return false;
@@ -860,15 +873,20 @@ public function valid(): bool
860873
return false;
861874
}
862875

863-
public function next()
876+
public function next(): void
864877
{
865878
}
866879

880+
/**
881+
* @return mixed
882+
*/
883+
#[\ReturnTypeWillChange]
867884
public function key()
868885
{
886+
return false;
869887
}
870888

871-
public function rewind()
889+
public function rewind(): void
872890
{
873891
}
874892
}],

0 commit comments

Comments
 (0)