1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Allow generator to be used as a traversable

This commit is contained in:
Matthew Brown 2017-02-08 20:58:50 -05:00
parent 8cd83a581a
commit 5cbd25fccc

View File

@ -149,6 +149,10 @@ class ClassChecker extends ClassLikeChecker
return true;
}
if ($interface_id === 'traversable' && $fq_class_name === 'generator') {
return true;
}
if (isset(self::$SPECIAL_TYPES[$interface_id]) || isset(self::$SPECIAL_TYPES[$fq_class_name])) {
return false;
}