Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet authored and ondrejmirtes committed Feb 9, 2024
1 parent cad5050 commit 601665c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Type/Doctrine/Query/QueryResultTypeWalker.php
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ public function walkArithmeticExpression($arithmeticExpr): string
public function walkSimpleArithmeticExpression($simpleArithmeticExpr): string
{
if (!$simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression) {
return $this->marshalType(new MixedType());
return $this->walkArithmeticTerm($simpleArithmeticExpr);
}

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

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

$primary = $factor->arithmeticPrimary;
Expand Down Expand Up @@ -1265,6 +1265,10 @@ public function walkArithmeticPrimary($primary): string
*/
public function walkStringPrimary($stringPrimary): string
{
if ($stringPrimary instanceof AST\Node) {
return $stringPrimary->dispatch($this);
}

return $this->marshalType(new MixedType());
}

Expand Down

0 comments on commit 601665c

Please sign in to comment.