1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Keep going even when function doesn’t exist

This commit is contained in:
Matthew Brown 2019-06-15 16:14:36 -04:00
parent 2d5f332ebf
commit 56e66af6a2
2 changed files with 10 additions and 1 deletions

View File

@ -263,7 +263,7 @@ class FunctionCallAnalyzer extends \Psalm\Internal\Analyzer\Statements\Expressio
$is_maybe_root_function
) === false
) {
return false;
return;
}
}
} else {

View File

@ -89,6 +89,15 @@ class IssueSuppressionTest extends TestCase
strlen("a", "b");
}'
],
'suppressUndefinedFunction' => [
'<?php
function verify_return_type(): DateTime {
/** @psalm-suppress UndefinedFunction */
unknown_function_call();
return new DateTime();
}',
],
];
}