Skip to content

Commit

Permalink
Fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Jan 26, 2022
1 parent 4dc74e9 commit 406c6c3
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tests/Loop/ForeachTest.php
Expand Up @@ -794,7 +794,7 @@ class Item {
}
/**
* @implements IteratorAggregate<array-key, Item, ArrayIterator<array-key, Item>>
* @implements IteratorAggregate<array-key, Item>
*/
class Collection implements IteratorAggregate {
/**
Expand Down Expand Up @@ -933,6 +933,9 @@ public function contains(Value $item): bool
}
}
/**
* @psalm-suppress MissingTemplateParam
*/
class ValueCollectionIterator implements \Countable, \Iterator
{
/**
Expand Down
3 changes: 3 additions & 0 deletions tests/PropertyTypeInvarianceTest.php
Expand Up @@ -335,6 +335,9 @@ class Pair
protected $b;
}
/**
* @psalm-suppress MissingTemplateParam
*/
class FooPair extends Pair
{
/** @var Foo|null */ // Template defaults to mixed, this is invariant
Expand Down
3 changes: 3 additions & 0 deletions tests/StubTest.php
Expand Up @@ -1110,6 +1110,9 @@ class A {
public function find($id, $lockMode = null, $lockVersion = null) {}
}
/**
* @psalm-suppress MissingTemplateParam
*/
class B extends A {}
class Obj {}
Expand Down
2 changes: 1 addition & 1 deletion tests/Template/ClassTemplateTest.php
Expand Up @@ -532,7 +532,7 @@ function(Collection $elt): bool { return true; }
* @template TKey
* @template TValue
*
* @extends \IteratorAggregate<TKey, TValue, \Traversable<TKey,TValue>>
* @extends \IteratorAggregate<TKey, TValue>
*/
interface ICollection extends \IteratorAggregate {
/** @return \Traversable<TKey,TValue> */
Expand Down
3 changes: 3 additions & 0 deletions tests/Template/FunctionTemplateTest.php
Expand Up @@ -480,6 +480,9 @@ function () : int {
'<?php
class Foo {}
/**
* @psalm-suppress MissingTemplateParam
*/
class SomeIterator implements IteratorAggregate
{
public function getIterator() {
Expand Down
3 changes: 3 additions & 0 deletions tests/Template/TraitTemplateTest.php
Expand Up @@ -725,6 +725,9 @@ class C implements Arr {
use T1;
}
/**
* @psalm-suppress MissingTemplateParam
*/
class D extends C {
/**
* @param mixed $offset
Expand Down

0 comments on commit 406c6c3

Please sign in to comment.