private function isEndOfClass(int $lastUseEndPos): bool
    {
        $file = $this->getFile();
        $tokens = $file->getTokens();

        $posAfterLastUse = TokenHelper::findNextEffective($file, $lastUseEndPos + 1);

        return $tokens[$posAfterLastUse]['code'] === T_CLOSE_CURLY_BRACKET;
    }