Example #1
0
 public function pExpr_FuncCall(\PHPParser_Node_Expr_FuncCall $node)
 {
     $firstToken = '';
     $lastToken = '';
     if (count($node->args) > 0) {
         if ($node->getAttribute('startLine') != reset($node->args)->getAttribute('startLine')) {
             $firstToken = LF . $this->indentToken;
         }
         if ($node->getAttribute('startLine') != end($node->args)->getAttribute('startLine')) {
             $lastToken = LF;
         }
     }
     return $this->p($node->name) . '(' . $firstToken . $this->pParameterNodes($node->args) . $lastToken . ')';
 }
 private function doTestTypeFunction(LinkedFlowScope $blind, $name, $arg, $outcome, array $trueOutcome, array $falseOutcome)
 {
     $function = new \PHPParser_Node_Expr_FuncCall(new \PHPParser_Node_Name(array($name)));
     $function->args[] = new \PHPParser_Node_Arg($arg);
     if ('gettype' !== $name) {
         $function->setAttribute('type', $this->registry->getNativeType('boolean'));
     }
     $this->doTestBinop($blind, 'Equal', $function, $this->resolveOutcome($outcome), $trueOutcome, $falseOutcome);
 }