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

Also match substr_replace

This commit is contained in:
Matthew Brown 2018-05-09 00:39:45 -04:00
parent 8149573754
commit b4c0ffbe9d

View File

@ -55,7 +55,7 @@ class FunctionChecker extends FunctionLikeChecker
if ($call_args) {
if (in_array(
$call_map_key,
['str_replace', 'str_ireplace', 'preg_replace', 'preg_replace_callback'],
['str_replace', 'str_ireplace', 'substr_replace', 'preg_replace', 'preg_replace_callback'],
true
)) {
if (isset($call_args[2]->value->inferredType)) {