File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -293,22 +293,22 @@ public static function union(Type ...$types): Type
293293 continue ;
294294 }
295295
296- for ($ i = 0 ; $ i < count ($ scalarTypeItems ); $ i ++) {
297- for ($ j = 0 ; $ j < count ($ types ); $ j ++) {
298- $ compareResult = self ::compareTypesInUnion ($ scalarTypeItems [$ i ], $ types [$ j ]);
296+ for ($ i = 0 ; $ i < count ($ types ); $ i ++) {
297+ for ($ j = 0 ; $ j < count ($ scalarTypeItems ); $ j ++) {
298+ $ compareResult = self ::compareTypesInUnion ($ types [$ i ], $ scalarTypeItems [$ j ]);
299299 if ($ compareResult === null ) {
300300 continue ;
301301 }
302302
303303 [$ a , $ b ] = $ compareResult ;
304304 if ($ a !== null ) {
305- $ scalarTypeItems [$ i ] = $ a ;
306- array_splice ($ types , $ j --, 1 );
305+ $ types [$ i ] = $ a ;
306+ array_splice ($ scalarTypeItems , $ j --, 1 );
307307 continue 1 ;
308308 }
309309 if ($ b !== null ) {
310- $ types [$ j ] = $ b ;
311- array_splice ($ scalarTypeItems , $ i --, 1 );
310+ $ scalarTypeItems [$ j ] = $ b ;
311+ array_splice ($ types , $ i --, 1 );
312312 continue 2 ;
313313 }
314314 }
You can’t perform that action at this time.
0 commit comments