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