/** * Because we are extending the BasicExpr our left operand is its only * only operand so we will reuse that and only write a setter for the * right * * @param string | object $leftOp * @param string $operator * @parma string | object $rightOp * @param bool $isPar flag or using parentheses * @return BinaryExpr */ public function __construct($leftOp, $operator, $rightOp, $isPar = false) { $this->setOperator($operator); $this->setRightOperand($rightOp); parent::__construct($leftOp, $isPar); }
/** * @param string $operand * @return File */ public function __construct($operator, $operand, $isParentheses = false) { $this->setOperator($operator); parent::__construct($operand, $isParentheses); }