private function ensureSingleLine(Tokens $tokens, $index)
    {
        $previousToken = $tokens[$index - 1];
        if ($previousToken->isComment() && 0 !== strpos($previousToken->getContent(), '/*')) {
            return false;
        }

        $content = Preg::replace('/\R[ \t]*/', '', $tokens[$index]->getContent());
        if ('' !== $content) {
            $tokens[$index] = new Token([T_WHITESPACE, $content]);
        } else {
            $tokens->clearAt($index);
        }

        return true;
    }
private function ensureSingleLine(Tokens $tokens, $index)
    {
        $previousToken = $tokens[$index - 1];
        if ($previousToken->isComment() && 0 !== strpos($previousToken->getContent(), '/*')) {
            return false;
        }

        $content = Preg::replace('/\R[ \t]*/', '', $tokens[$index]->getContent());
        if ('' !== $content) {
            $tokens[$index] = new Token([T_WHITESPACE, $content]);
        } else {
            $tokens->clearAt($index);
        }

        return true;
    }
@param Tokens $tokens
@param int    $index

@return bool Whether newlines were removed from the whitespace token