Skip to content

Commit d035fbd

Browse files
committed
simplify
1 parent 5b589b4 commit d035fbd

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
@@ -361,11 +361,9 @@ public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $uni
361361

362362
public function setExistingOffsetValueType(Type $offsetType, Type $valueType): Type
363363
{
364-
return TypeCombinator::intersect(
365-
new self(
366-
$this->keyType,
367-
TypeCombinator::union($this->itemType, $valueType),
368-
),
364+
return new self(
365+
$this->keyType,
366+
TypeCombinator::union($this->itemType, $valueType),
369367
);
370368
}
371369

0 commit comments

Comments
 (0)