fix naming of non-func call

This commit is contained in:
TomasVotruba 2020-02-29 01:20:34 +01:00
parent 6d2c6a0395
commit e0baf3330b

View File

@ -55,9 +55,13 @@ final class AssertRegExpRector extends AbstractPHPUnitRector
return null;
}
/** @var FuncCall $secondArgumentValue */
/** @var FuncCall|Node $secondArgumentValue */
$secondArgumentValue = $node->args[1]->value;
if (! $secondArgumentValue instanceof FuncCall) {
return null;
}
if (! $this->isName($secondArgumentValue, 'preg_match')) {
return null;
}