mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Fix #915 - never care about falsable/nullable issues when matching functions from callmap
This commit is contained in:
parent
b9018a4a03
commit
abc19d7136
@ -1058,8 +1058,8 @@ abstract class FunctionLikeChecker extends SourceChecker implements StatementsSo
|
||||
$project_checker->codebase,
|
||||
$arg->value->inferredType,
|
||||
$param_type,
|
||||
$arg->value->inferredType->ignore_nullable_issues,
|
||||
$arg->value->inferredType->ignore_falsable_issues
|
||||
true,
|
||||
true
|
||||
)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -694,12 +694,17 @@ class FunctionCallTest extends TestCase
|
||||
'$h' => 'array<mixed, mixed>',
|
||||
],
|
||||
],
|
||||
'strstrWithPossiblyFalseFirstArg' => [
|
||||
'strtrWithPossiblyFalseFirstArg' => [
|
||||
'<?php
|
||||
strtr(
|
||||
file_get_contents("foobar.txt"),
|
||||
["foo" => "bar"]
|
||||
);'
|
||||
/**
|
||||
* @param string|false $str
|
||||
* @param array<string, string> $replace_pairs
|
||||
* @return string
|
||||
*/
|
||||
function strtr_wrapper($str, array $replace_pairs) {
|
||||
/** @psalm-suppress PossiblyFalseArgument */
|
||||
return strtr($str, $replace_pairs);
|
||||
}',
|
||||
],
|
||||
'splatArrayIntersect' => [
|
||||
'<?php
|
||||
|
Loading…
Reference in New Issue
Block a user