Skip to content

Commit 12f2e10

Browse files
committed
Update ArrayMergeFunctionDynamicReturnTypeExtension.php
1 parent e5a92f1 commit 12f2e10

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Type/Php/ArrayMergeFunctionDynamicReturnTypeExtension.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,9 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
103103

104104
$offsetTypes = [];
105105
foreach ($argTypes as $argType) {
106-
if ($argType->isConstantArray()->yes()) {
107-
foreach ($argType->getConstantArrays() as $constantArray) {
106+
$constArrays = $argType->getConstantArrays();
107+
if ($constArrays !== []) {
108+
foreach ($constArrays as $constantArray) {
108109
foreach ($constantArray->getKeyTypes() as $keyType) {
109110
$hasOffsetValue = TrinaryLogic::createFromBoolean($argType->hasOffsetValueType($keyType)->yes());
110111
$offsetTypes[$keyType->getValue()] = [

0 commit comments

Comments
 (0)