1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Treat str_ireplace like str_replace

This commit is contained in:
Matthew Brown 2018-05-09 00:34:44 -04:00
parent 3380de16a2
commit 8149573754

View File

@ -53,7 +53,11 @@ class FunctionChecker extends FunctionLikeChecker
}
if ($call_args) {
if (in_array($call_map_key, ['str_replace', 'preg_replace', 'preg_replace_callback'], true)) {
if (in_array(
$call_map_key,
['str_replace', 'str_ireplace', 'preg_replace', 'preg_replace_callback'],
true
)) {
if (isset($call_args[2]->value->inferredType)) {
$subject_type = $call_args[2]->value->inferredType;