/** * @param PHPPreStack $stack * @param PHPPreActionSet $actionSet * @throws PHPPreParserException */ public function handleInternal(PHPPreStack &$stack, PHPPreActionSet &$actionSet) { $arguments = preg_split('/[\\s]/', $this->argument); $define = PhpPreTask::defineGet($arguments[0]); $leftOperator = PHPPreOperatorFactory::createValueOperator($define); $rightOperator = PHPPreOperatorFactory::createValueOperator($arguments[2]); try { $operator = PHPPreOperatorFactory::createBinaryOperator($arguments[1], $leftOperator, $rightOperator); } catch (Exception $ex) { throw new PHPPreParserException($ex->getMessage(), $this->getFileLine()); } $this->condition = $operator->getValue(); $stack->push($this); }
/** * @param PHPPreStack $stack * @param PHPPreActionSet $actionSet */ public function handleInternal(PHPPreStack &$stack, PHPPreActionSet &$actionSet) { $this->condition = PhpPreTask::defineGet($this->argument) === null; $stack->push($this); }