We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 831aa92 commit a0da6c4Copy full SHA for a0da6c4
src/Type/Constant/ConstantArrayType.php
@@ -701,9 +701,7 @@ public function getOffsetValueType(Type $offsetType): Type
701
public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = true): Type
702
{
703
if ($offsetType !== null) {
704
- $offsetType = $offsetType->toArrayKey();
705
-
706
- $scalarKeyTypes = $offsetType->getConstantStrings();
+ $scalarKeyTypes = $offsetType->toArrayKey()->getConstantStrings();
707
if (count($scalarKeyTypes) === 0) {
708
$integerRanges = TypeUtils::getIntegerRanges($offsetType);
709
if (count($integerRanges) > 0) {
0 commit comments