We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb014ee commit a7a7645Copy full SHA for a7a7645
src/Analyser/TypeSpecifier.php
@@ -339,7 +339,7 @@ public function specifyTypesInCondition(
339
if (
340
!$context->null()
341
&& $expr->right instanceof FuncCall
342
- && count($expr->right->getArgs()) === 3
+ && count($expr->right->getArgs()) >= 3
343
&& $expr->right->name instanceof Name
344
&& in_array(strtolower((string) $expr->right->name), ['preg_match'], true)
345
&& IntegerRangeType::fromInterval(0, null)->isSuperTypeOf($leftType)->yes()
0 commit comments