protected static function applySortBy(array $prefixes, $sortBy): array
    {
        if($sortBy === 'count' || $sortBy === '')
        {
            return $prefixes;
        }

        if($sortBy === 'alpha')
        {
            sort($prefixes);
            return $prefixes;
        }
    }
protected static function applySortBy(array $prefixes, $sortBy): array
    {
        if($sortBy === 'count' || $sortBy === '')
        {
            return $prefixes;
        }

        if($sortBy === 'alpha')
        {
            sort($prefixes);
            return $prefixes;
        }
    }
protected static function applySortBy ( array $ prefixes , $ sortBy ) : array { if ( $ sortBy === 'count' || $ sortBy === '' ) { return $ prefixes ; } if ( $ sortBy === 'alpha' ) { sort ( $ prefixes ) ; return $ prefixes ; } }
Applies the configured sortBy.

@param array $prefixes
@param string $sortBy
@return array
Applies the configured sortBy .