Skip to content

Commit

Permalink
fix to use isConstantArray in reduceArrays too
Browse files Browse the repository at this point in the history
  • Loading branch information
rajyan committed Dec 19, 2022
1 parent b611f52 commit d0626fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Type/TypeCombinator.php
Expand Up @@ -644,7 +644,7 @@ private static function reduceArrays(array $constantArrays): array
$arraysToProcess = [];
$emptyArray = null;
foreach ($constantArrays as $constantArray) {
if (!$constantArray instanceof ConstantArrayType) {
if (!$constantArray->isConstantArray()->yes()) {
$newArrays[] = $constantArray;
continue;
}
Expand All @@ -654,7 +654,7 @@ private static function reduceArrays(array $constantArrays): array
continue;
}

$arraysToProcess[] = $constantArray;
$arraysToProcess = array_merge($arraysToProcess, $constantArray->getConstantArrays());
}

if ($emptyArray !== null) {
Expand Down

0 comments on commit d0626fb

Please sign in to comment.