Skip to content

Commit f44197e

Browse files
staabmondrejmirtes
authored andcommitted
simplify
1 parent 661ff6c commit f44197e

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5955,7 +5955,6 @@ private function produceArrayDimFetchAssignValueToWrite(array $dimFetchStack, ar
59555955
$valueToWrite = TypeCombinator::intersect(
59565956
$valueToWrite,
59575957
$hasOffsetType,
5958-
new NonEmptyArrayType(),
59595958
);
59605959
} else {
59615960
$valueToWrite = TypeCombinator::intersect(

src/Type/ArrayType.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,9 @@ public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $uni
356356

357357
public function setExistingOffsetValueType(Type $offsetType, Type $valueType): Type
358358
{
359-
return TypeCombinator::intersect(
360-
new self(
361-
$this->keyType,
362-
TypeCombinator::union($this->itemType, $valueType),
363-
),
359+
return new self(
360+
$this->keyType,
361+
TypeCombinator::union($this->itemType, $valueType),
364362
);
365363
}
366364

0 commit comments

Comments
 (0)