private function isMethodCall(Tokens $tokens, $index)
    {
        $prevIndex = $tokens->getPrevMeaningfulToken($index);
        if (!$tokens[$prevIndex]->equals([T_OBJECT_OPERATOR, '->'])) {
            return false; // not a "simple" method call
        }

        return $tokens[$tokens->getNextMeaningfulToken($index)]->equals('(');
    }
private function isMethodCall(Tokens $tokens, $index)
    {
        $prevIndex = $tokens->getPrevMeaningfulToken($index);
        if (!$tokens[$prevIndex]->equals([T_OBJECT_OPERATOR, '->'])) {
            return false; // not a "simple" method call
        }

        return $tokens[$tokens->getNextMeaningfulToken($index)]->equals('(');
    }
@param Tokens $tokens
@param int    $index

@return bool