mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Fix #2925 - ignore null return type for array_replace_recursive
This commit is contained in:
parent
3ebb5a1142
commit
73badf59d1
@ -370,6 +370,15 @@ class FunctionAnalyzer extends FunctionLikeAnalyzer
|
||||
}
|
||||
}
|
||||
|
||||
switch ($call_map_key) {
|
||||
case 'array_replace':
|
||||
case 'array_replace_recursive':
|
||||
if ($codebase->config->ignore_internal_nullable_issues) {
|
||||
$call_map_return_type->ignore_nullable_issues = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return $call_map_return_type;
|
||||
}
|
||||
|
||||
|
@ -394,7 +394,7 @@ return [
|
||||
'array_rand' => ['int|string|array<int,int>|array<int,string>', 'input'=>'array', 'num_req'=>'int'],
|
||||
'array_rand\'1' => ['int|string', 'input'=>'array'],
|
||||
'array_reduce' => ['mixed', 'input'=>'array', 'callback'=>'callable(mixed,mixed):mixed', 'initial='=>'mixed'],
|
||||
'array_replace' => ['array', 'arr1'=>'array', 'arr2'=>'array', '...args='=>'array'],
|
||||
'array_replace' => ['?array', 'arr1'=>'array', 'arr2'=>'array', '...args='=>'array'],
|
||||
'array_replace_recursive' => ['?array', 'arr1'=>'array', 'arr2'=>'array', '...args='=>'array'],
|
||||
'array_reverse' => ['array', 'input'=>'array', 'preserve='=>'bool'],
|
||||
'array_search' => ['int|string|false', 'needle'=>'mixed', 'haystack'=>'array', 'strict='=>'bool'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user