private function getRealLinesAfterLastUse(int $lastUseEndPos): array
    {
        $file = $this->getFile();
        $tokens = $file->getTokens();
        $whitespaceEnd = TokenHelper::findNextExcluding($file, T_WHITESPACE, $lastUseEndPos + 1) - 1;

        if ($lastUseEndPos !== $whitespaceEnd && $tokens[$whitespaceEnd]['content'] !== $file->eolChar) {
            $lastEolPos = TokenHelper::findPreviousContent(
                $file,
                T_WHITESPACE,
                $file->eolChar,
                $whitespaceEnd - 1,
                $lastUseEndPos
            );
            $whitespaceEnd = $lastEolPos ?? $lastUseEndPos;
        }

        $whitespaceAfterLastUse = TokenHelper::getContent($file, $lastUseEndPos + 1, $whitespaceEnd);

        $realLinesAfterUse = substr_count($whitespaceAfterLastUse, $file->eolChar) - 1;

        return [$realLinesAfterUse, $whitespaceEnd];
    }