src/Parser/Parser.php
protected function parseObjectAccessor($d, Token $name, $args, Accessor $next = null): Accessor
    {
        if ($args === null) {
            return new PropertyAccessor($name->value, $next);
        }
        
        return new MethodAccessor($name->value, $args[1] ?? [], $next);
    }
protected function parseObjectAccessor($d, Token $name, $args, Accessor $next = null): Accessor
    {
        if ($args === null) {
            return new PropertyAccessor($name->value, $next);
        }
        
        return new MethodAccessor($name->value, $args[1] ?? [], $next);
    }
ObjectAccessor ::= '.' T_IDENTIFIER ( '(' ArgumentList? ')' )? Accessor?