Skip to content

Commit 032d2e7

Browse files
committed
simplify
1 parent a1b6514 commit 032d2e7

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/Type/Accessory/AccessoryArrayListType.php

+1-12
Original file line numberDiff line numberDiff line change
@@ -163,18 +163,7 @@ public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $uni
163163

164164
public function setExistingOffsetValueType(Type $offsetType, Type $valueType): Type
165165
{
166-
if ((new ConstantIntegerType(0))->isSuperTypeOf($offsetType)->yes()) {
167-
return $this;
168-
}
169-
170-
if (
171-
$valueType->isArray()->yes()
172-
&& IntegerRangeType::fromInterval(0, null)->isSuperTypeOf($offsetType)->yes()
173-
) {
174-
return $this;
175-
}
176-
177-
return new ErrorType();
166+
return $this;
178167
}
179168

180169
public function unsetOffset(Type $offsetType): Type

0 commit comments

Comments
 (0)