mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Add gotchas
This commit is contained in:
parent
e35c328e89
commit
f3d4e35a52
@ -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])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user