File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -795,7 +795,7 @@ public function walkSelectExpression($selectExpression)
795
795
796
796
$ type = $ this ->resolveDoctrineType ($ typeName , $ enumType , $ nullable );
797
797
798
- $ this ->typeBuilder -> addScalar ($ resultAlias , $ type );
798
+ $ this ->addScalar ($ resultAlias , $ type );
799
799
800
800
return '' ;
801
801
}
@@ -855,7 +855,7 @@ public function walkSelectExpression($selectExpression)
855
855
});
856
856
}
857
857
858
- $ this ->typeBuilder -> addScalar ($ resultAlias , $ type );
858
+ $ this ->addScalar ($ resultAlias , $ type );
859
859
860
860
return '' ;
861
861
}
@@ -1276,6 +1276,18 @@ public function walkResultVariable($resultVariable)
1276
1276
return $ this ->marshalType (new MixedType ());
1277
1277
}
1278
1278
1279
+ /**
1280
+ * @param array-key $alias
1281
+ */
1282
+ private function addScalar ($ alias , Type $ type ): void
1283
+ {
1284
+ if ($ type instanceof UnionType) {
1285
+ $ type = TypeUtils::toBenevolentUnion ($ type );
1286
+ }
1287
+
1288
+ $ this ->typeBuilder ->addScalar ($ alias , $ type );
1289
+ }
1290
+
1279
1291
private function unmarshalType (string $ marshalledType ): Type
1280
1292
{
1281
1293
$ type = unserialize ($ marshalledType );
You can’t perform that action at this time.
0 commit comments