PHPCfg\Parser::parseExpr_FuncCall PHP Method

parseExpr_FuncCall() protected method

protected parseExpr_FuncCall ( PhpParser\Node\Expr\FuncCall $expr )
$expr PhpParser\Node\Expr\FuncCall
    protected function parseExpr_FuncCall(Expr\FuncCall $expr)
    {
        $args = $this->parseExprList($expr->args, self::MODE_READ);
        $name = $this->parseExprNode($expr->name);
        if ($this->currentNamespace && $expr->name instanceof Node\Name && $expr->name->isUnqualified()) {
            $op = new Op\Expr\NsFuncCall($name, $this->parseExprNode(Node\Name::concat($this->currentNamespace, $expr->name)), $args, $this->mapAttributes($expr));
        } else {
            $op = new Op\Expr\FuncCall($name, $args, $this->mapAttributes($expr));
        }
        if ($name instanceof Operand\Literal) {
            static $assertionFunctions = ['is_array' => 'array', 'is_bool' => 'bool', 'is_callable' => 'callable', 'is_double' => 'float', 'is_float' => 'float', 'is_int' => 'int', 'is_integer' => 'int', 'is_long' => 'int', 'is_null' => 'null', 'is_numeric' => 'numeric', 'is_object' => 'object', 'is_real' => 'float', 'is_string' => 'string', 'is_resource' => 'resource'];
            $lname = strtolower($name->value);
            if (isset($assertionFunctions[$lname])) {
                $op->result->addAssertion($args[0], new Assertion\TypeAssertion(new Operand\Literal($assertionFunctions[$lname])));
            }
        }
        return $op;
    }
Parser