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:
parent
2d5f332ebf
commit
56e66af6a2
@ -263,7 +263,7 @@ class FunctionCallAnalyzer extends \Psalm\Internal\Analyzer\Statements\Expressio
|
||||
$is_maybe_root_function
|
||||
) === false
|
||||
) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -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();
|
||||
}',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user