Skip to content

Commit 601665c

Browse files
VincentLangletondrejmirtes
authored andcommitted
More fixes
1 parent cad5050 commit 601665c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Type/Doctrine/Query/QueryResultTypeWalker.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ public function walkArithmeticExpression($arithmeticExpr): string
11801180
public function walkSimpleArithmeticExpression($simpleArithmeticExpr): string
11811181
{
11821182
if (!$simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression) {
1183-
return $this->marshalType(new MixedType());
1183+
return $this->walkArithmeticTerm($simpleArithmeticExpr);
11841184
}
11851185

11861186
$types = [];
@@ -1206,7 +1206,7 @@ public function walkSimpleArithmeticExpression($simpleArithmeticExpr): string
12061206
public function walkArithmeticTerm($term): string
12071207
{
12081208
if (!$term instanceof AST\ArithmeticTerm) {
1209-
return $this->marshalType(new MixedType());
1209+
return $this->walkArithmeticFactor($term);
12101210
}
12111211

12121212
$types = [];
@@ -1232,7 +1232,7 @@ public function walkArithmeticTerm($term): string
12321232
public function walkArithmeticFactor($factor): string
12331233
{
12341234
if (!$factor instanceof AST\ArithmeticFactor) {
1235-
return $this->marshalType(new MixedType());
1235+
return $this->walkArithmeticPrimary($factor);
12361236
}
12371237

12381238
$primary = $factor->arithmeticPrimary;
@@ -1265,6 +1265,10 @@ public function walkArithmeticPrimary($primary): string
12651265
*/
12661266
public function walkStringPrimary($stringPrimary): string
12671267
{
1268+
if ($stringPrimary instanceof AST\Node) {
1269+
return $stringPrimary->dispatch($this);
1270+
}
1271+
12681272
return $this->marshalType(new MixedType());
12691273
}
12701274

0 commit comments

Comments
 (0)