File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -1219,6 +1219,7 @@ public static function intersect(Type ...$types): Type
12191219if (
12201220$ types [$ i ] instanceof ConstantArrayType
12211221&& count ($ types [$ i ]->getKeyTypes ()) === 1
1222+ && $ types [$ i ]->isOptionalKey (0 )
12221223&& $ types [$ j ] instanceof NonEmptyArrayType
12231224) {
12241225$ types [$ i ] = $ types [$ i ]->makeOffsetRequired ($ types [$ i ]->getKeyTypes ()[0 ]);
@@ -1230,6 +1231,7 @@ public static function intersect(Type ...$types): Type
12301231if (
12311232$ types [$ j ] instanceof ConstantArrayType
12321233&& count ($ types [$ j ]->getKeyTypes ()) === 1
1234+ && $ types [$ j ]->isOptionalKey (0 )
12331235&& $ types [$ i ] instanceof NonEmptyArrayType
12341236) {
12351237$ types [$ j ] = $ types [$ j ]->makeOffsetRequired ($ types [$ j ]->getKeyTypes ()[0 ]);
You can’t perform that action at this time.
0 commit comments