File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -210,12 +210,7 @@ public static function union(Type ...$types): Type
210
210
$ scalarTypes [$ classType ] = array_values ($ scalarTypeItems );
211
211
}
212
212
213
- $ types = array_values (
214
- array_merge (
215
- $ types ,
216
- self ::processArrayTypes ($ arrayTypes ),
217
- ),
218
- );
213
+ $ types = array_values ($ types );
219
214
$ typesCount = count ($ types );
220
215
221
216
foreach ($ scalarTypes as $ classType => $ scalarTypeItems ) {
@@ -263,9 +258,14 @@ public static function union(Type ...$types): Type
263
258
$ newTypes [$ type ->describe (VerbosityLevel::cache ())] = $ type ;
264
259
}
265
260
$ types = array_values ($ newTypes );
266
- $ typesCount = count ($ types );
267
261
}
268
262
263
+ $ types = array_merge (
264
+ $ types ,
265
+ self ::processArrayTypes ($ arrayTypes ),
266
+ );
267
+ $ typesCount = count ($ types );
268
+
269
269
// transform A | A to A
270
270
// transform A | never to A
271
271
for ($ i = 0 ; $ i < $ typesCount ; $ i ++) {
You can’t perform that action at this time.
0 commit comments