for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Doctrine\ORM\Query\AST\Functions;
use Doctrine\ORM\Query\Lexer;
/**
* "ABS" "(" SimpleArithmeticExpression ")"
*
* @link www.doctrine-project.org
* @since 2.0
* @author Guilherme Blanco <[email protected]>
* @author Jonathan Wage <[email protected]>
* @author Roman Borschel <[email protected]>
* @author Benjamin Eberlei <[email protected]>
*/
class AbsFunction extends FunctionNode
{
* @var \Doctrine\ORM\Query\AST\SimpleArithmeticExpression
public $simpleArithmeticExpression;
* @override
* @inheritdoc
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression(
$this->simpleArithmeticExpression
) . ')';
}
public function parse(\Doctrine\ORM\Query\Parser $parser)
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);