File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change 6262use function count ;
6363use function implode ;
6464use function in_array ;
65- use function is_int ;
6665use function is_string ;
6766use function min ;
6867use function pow ;
@@ -755,17 +754,7 @@ private function resolveFiniteScalarKeyTypes(Type $offsetType): ?array
755754 $ constantStrings = $ offsetType ->getConstantStrings ();
756755 if (count ($ constantStrings ) > 0 ) {
757756 foreach ($ constantStrings as $ constantString ) {
758- $ scalarValues = $ constantString ->getConstantScalarValues ();
759- if (count ($ scalarValues ) !== 1 ) {
760- return null ;
761- }
762- if (is_int ($ scalarValues [0 ])) {
763- $ result [] = new ConstantIntegerType ($ scalarValues [0 ]);
764- } elseif (is_string ($ scalarValues [0 ])) {
765- $ result [] = new ConstantStringType ($ scalarValues [0 ]);
766- } else {
767- return null ;
768- }
757+ $ result [] = $ constantString ;
769758 }
770759 } else {
771760 $ integerRanges = TypeUtils::getIntegerRanges ($ offsetType );
You can’t perform that action at this time.
0 commit comments