mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 12:55:26 +01:00
Only emit one error for erroneous array_map string closure types
This commit is contained in:
parent
4d73b2501b
commit
6c62e46d15
@ -700,6 +700,11 @@ class ArrayFunctionArgumentsAnalyzer
|
||||
return;
|
||||
}
|
||||
|
||||
// we pick up errors for string closures elsewhere
|
||||
if ($method_id === 'array_map' && $closure_type instanceof Type\Atomic\TString) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($closure_params as $i => $closure_param) {
|
||||
if (!isset($array_arg_types[$i])) {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user