src/Standards/BestIt/Sniffs/DocTags/TagSortingSniff.php
private function sortTokens(array $tokens): array
    {
        $tagCounts = $this->docTagHelper->getTagCounts($tokens);

        usort($tokens, function (array $leftToken, array $rightToken) use ($tagCounts): int {
            return $this->compareTokensForSorting($leftToken, $rightToken, $tagCounts);
        });

        return $tokens;
    }
private function sortTokens(array $tokens): array
    {
        $tagCounts = $this->docTagHelper->getTagCounts($tokens);

        usort($tokens, function (array $leftToken, array $rightToken) use ($tagCounts): int {
            return $this->compareTokensForSorting($leftToken, $rightToken, $tagCounts);
        });

        return $tokens;
    }
private function sortTokens ( array $ tokens ) : array { $ tagCounts = $ this -> docTagHelper -> getTagCounts ( $ tokens ) ; usort ( $ tokens , function ( array $ leftToken , array $ rightToken ) use ( $ tagCounts ) : int { return $ this -> compareTokensForSorting ( $ leftToken , $ rightToken , $ tagCounts ) ; } ) ; return $ tokens ; }
Sorts the tokens in blocks of their occurrences and then alphabetically, but the return at last.

@param array $tokens The tokens.

@return array The sorted tokens.
Sorts the tokens in blocks of their occurrences and then alphabetically but the return at last .