Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Sep 27, 2022
1 parent 9f2fd03 commit 7eb64d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/PHPStan/Generics/data/bug2620-3.json
@@ -1,7 +1,7 @@
[
{
"message": "Return type (Traversable<int, Generics\\Bug2620\\Bar>) of method Generics\\Bug2620\\SomeIterator::getIterator() should be compatible with return type (Traversable<int, Generics\\Bug2620\\Foo>) of method IteratorAggregate<int,Generics\\Bug2620\\Foo>::getIterator()",
"line": 17,
"line": 18,
"ignorable": true
}
]
]
1 change: 1 addition & 0 deletions tests/PHPStan/Generics/data/bug2620.php
Expand Up @@ -14,6 +14,7 @@ class SomeIterator implements \IteratorAggregate {
/**
* @return \Traversable<int, Bar>
*/
#[\ReturnTypeWillChange]
public function getIterator() {
yield new Bar;
}
Expand Down
1 change: 1 addition & 0 deletions tests/PHPStan/Generics/data/bug2622.php
Expand Up @@ -14,6 +14,7 @@ public function __construct() {
$this->values = [];
}

#[\ReturnTypeWillChange]
public function getIterator() {
return new \ArrayObject($this->values);
}
Expand Down

0 comments on commit 7eb64d3

Please sign in to comment.