1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Don’t warn about traversable objects

This commit is contained in:
Matt Brown 2017-11-15 11:58:46 -05:00
parent a99135c4d0
commit 4ff9ec2853

View File

@ -198,6 +198,12 @@ class ForeachChecker
} else {
$value_type = Type::getMixed();
}
} elseif (ClassChecker::classImplements(
$project_checker,
$iterator_type->value,
'Traversable'
)) {
// @todo try and get value type
} else {
if (IssueBuffer::accepts(
new RawObjectIteration(