src/Standards/BestIt/Sniffs/Formatting/TraitUseSpacingSniff.php
private function getLastUseEndPos(int $lastUsePos): int
    {
        $file = $this->getFile();
        $tokens = $file->getTokens();

        $lastUseEndPos = TokenHelper::findNextLocal(
            $file,
            [T_SEMICOLON, T_OPEN_CURLY_BRACKET],
            $lastUsePos + 1
        );

        if ($tokens[$lastUseEndPos]['code'] === T_OPEN_CURLY_BRACKET) {
            $lastUseEndPos = $tokens[$lastUseEndPos]['bracket_closer'];
        }

        return $lastUseEndPos;
    }
private function getLastUseEndPos(int $lastUsePos): int
    {
        $file = $this->getFile();
        $tokens = $file->getTokens();

        $lastUseEndPos = TokenHelper::findNextLocal(
            $file,
            [T_SEMICOLON, T_OPEN_CURLY_BRACKET],
            $lastUsePos + 1
        );

        if ($tokens[$lastUseEndPos]['code'] === T_OPEN_CURLY_BRACKET) {
            $lastUseEndPos = $tokens[$lastUseEndPos]['bracket_closer'];
        }

        return $lastUseEndPos;
    }
private function getLastUseEndPos ( int $ lastUsePos ) : int { $ file = $ this -> getFile ( ) ; $ tokens = $ file -> getTokens ( ) ; $ lastUseEndPos = TokenHelper :: findNextLocal ( $ file , [ T_SEMICOLON , T_OPEN_CURLY_BRACKET ] , $ lastUsePos + 1 ) ; if ( $ tokens [ $ lastUseEndPos ] [ 'code' ] === T_OPEN_CURLY_BRACKET ) { $ lastUseEndPos = $ tokens [ $ lastUseEndPos ] [ 'bracket_closer' ] ; } return $ lastUseEndPos ; }
Gets the position on which the last use ends.

@param int $lastUsePos

@return int
Gets the position on which the last use ends .