. */ namespace Doctrine\ORM\Query\AST; /** * ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary * * * @link www.doctrine-project.org * @since 2.0 * @version $Revision: 3938 $ * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel */ class ArithmeticFactor extends Node { /** * @var ArithmeticPrimary */ public $arithmeticPrimary; /** * @var null|boolean NULL represents no sign, TRUE means positive and FALSE means negative sign */ public $sign; public function __construct($arithmeticPrimary, $sign = null) { $this->arithmeticPrimary = $arithmeticPrimary; $this->sign = $sign; } public function isPositiveSigned() { return $this->sign === true; } public function isNegativeSigned() { return $this->sign === false; } public function dispatch($sqlWalker) { return $sqlWalker->walkArithmeticFactor($this); } }