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

Import PhpParser\Node\Expr\Closure as ClosureNode

This commit is contained in:
ralila 2021-12-05 00:32:38 +01:00
parent 81c94f12c1
commit da3a691c36

View File

@ -3,7 +3,7 @@ namespace Psalm\Internal\Codebase;
use Exception;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr\Closure;
use PhpParser\Node\Expr\Closure as ClosureNode;
use Psalm\Codebase;
use Psalm\Internal\Analyzer\StatementsAnalyzer;
use Psalm\Internal\MethodIdentifier;
@ -563,7 +563,7 @@ class Functions
}
$must_use = $function_id !== 'array_map'
|| (isset($args[0]) && !$args[0]->value instanceof Closure);
|| (isset($args[0]) && !$args[0]->value instanceof ClosureNode);
foreach ($function_callable->params as $i => $param) {
if ($type_provider && $param->type && $param->type->hasCallableType() && isset($args[$i])) {