File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -973,17 +973,15 @@ private function doHasOffsetValueType(Type $offsetType): TrinaryLogic
973973 }
974974 }
975975
976- $ result = $ this ->intersectResults (static fn (Type $ type ): TrinaryLogic => $ type ->hasOffsetValueType ($ offsetType ));
977-
978- if (!$ result ->yes () && $ this ->isCallable ()->yes () && $ this ->isArray ()->yes ()) {
976+ if ($ this ->isCallable ()->yes () && $ this ->isArray ()->yes ()) {
979977 $ arrayKeyOffsetType = $ offsetType ->toArrayKey ();
980978 $ callableArrayOffsetType = new UnionType ([new ConstantIntegerType (0 ), new ConstantIntegerType (1 )]);
981979 if ($ callableArrayOffsetType ->isSuperTypeOf ($ arrayKeyOffsetType )->yes ()) {
982980 return TrinaryLogic::createYes ();
983981 }
984982 }
985983
986- return $ result ;
984+ return $ this -> intersectResults ( static fn ( Type $ type ): TrinaryLogic => $ type -> hasOffsetValueType ( $ offsetType )) ;
987985 }
988986
989987 public function getOffsetValueType (Type $ offsetType ): Type
You can’t perform that action at this time.
0 commit comments