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

Suppress issue where we don’t want to autoload

This commit is contained in:
Matthew Brown 2019-05-26 16:40:02 -04:00
parent 69150d503a
commit fafe73de0a

View File

@ -419,6 +419,7 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
&& $node->cond->expr->args[0]->value instanceof PhpParser\Node\Scalar\String_
&& class_exists($node->cond->expr->args[0]->value->value, false)
) {
/** @psalm-suppress ArgumentTypeCoercion - special case where the class is internal */
$reflection_class = new \ReflectionClass($node->cond->expr->args[0]->value->value);
if ($reflection_class->getFileName() !== $this->file_path) {