Skip to content

Commit

Permalink
Split TreeWalker and SqlWalker
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Mar 30, 2022
1 parent 6a15af5 commit 1d97ce2
Show file tree
Hide file tree
Showing 18 changed files with 367 additions and 2,766 deletions.
15 changes: 3 additions & 12 deletions lib/Doctrine/ORM/Query/QueryException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Doctrine\ORM\Exception\ORMException;
use Doctrine\ORM\Query\AST\PathExpression;
use Exception;
use Stringable;

/**
* Description of QueryException.
Expand Down Expand Up @@ -126,24 +127,14 @@ public static function parameterTypeMismatch()
return new self('DQL Query parameter and type numbers mismatch, but have to be exactly equal.');
}

/**
* @param PathExpression $pathExpr
*
* @return QueryException
*/
public static function invalidPathExpression($pathExpr)
public static function invalidPathExpression(PathExpression $pathExpr): self
{
return new self(
"Invalid PathExpression '" . $pathExpr->identificationVariable . '.' . $pathExpr->field . "'."
);
}

/**
* @param string $literal
*
* @return QueryException
*/
public static function invalidLiteral($literal)
public static function invalidLiteral(string|Stringable $literal): self
{
return new self("Invalid literal '" . $literal . "'");
}
Expand Down

0 comments on commit 1d97ce2

Please sign in to comment.