Skip to content

Commit cb7a9f3

Browse files
committed
make this code more uniform with array_key_exists() handling
1 parent e7274bd commit cb7a9f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Analyser/TypeSpecifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ public function specifyTypesInCondition(
930930
} else {
931931
$varType = $scope->getType($var->var);
932932

933-
if ($varType->isArray()->yes() && $dimType->isConstantScalarValue()->no()) {
933+
if ($varType->isArray()->yes() && count($dimType->getConstantScalarTypes()) <= 1) {
934934
$types = $types->unionWith(
935935
$this->create(
936936
$var->var,

0 commit comments

Comments
 (0)