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 @@ -210,12 +210,7 @@ public static function union(Type ...$types): Type
210210 $ scalarTypes [$ classType ] = array_values ($ scalarTypeItems );
211211 }
212212
213- $ types = array_values (
214- array_merge (
215- $ types ,
216- self ::processArrayTypes ($ arrayTypes ),
217- ),
218- );
213+ $ types = array_values ($ types );
219214 $ typesCount = count ($ types );
220215
221216 foreach ($ scalarTypes as $ classType => $ scalarTypeItems ) {
@@ -263,9 +258,14 @@ public static function union(Type ...$types): Type
263258 $ newTypes [$ type ->describe (VerbosityLevel::cache ())] = $ type ;
264259 }
265260 $ types = array_values ($ newTypes );
266- $ typesCount = count ($ types );
267261 }
268262
263+ $ types = array_merge (
264+ $ types ,
265+ self ::processArrayTypes ($ arrayTypes ),
266+ );
267+ $ typesCount = count ($ types );
268+
269269 // transform A | A to A
270270 // transform A | never to A
271271 for ($ i = 0 ; $ i < $ typesCount ; $ i ++) {
You can’t perform that action at this time.
0 commit comments