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

Add gotchas

This commit is contained in:
Matthew Brown 2016-07-25 00:12:02 -04:00
parent e35c328e89
commit f3d4e35a52

View File

@ -251,6 +251,10 @@ class ClassChecker implements StatementsSource
return self::$_class_extends[$absolute_class][$possible_parent];
}
if (!self::classExists($absolute_class) || self::classExists($possible_parent)) {
return false;
}
if (!isset(self::$_class_extends[$absolute_class])) {
self::$_class_extends[$absolute_class] = [];
}
@ -425,6 +429,10 @@ class ClassChecker implements StatementsSource
return false;
}
if (in_array($interface, ['int', 'string', 'double', 'float', 'bool', 'false'])) {
return false;
}
$class_implementations = class_implements($absolute_class);
if (!isset($class_implementations[$interface])) {