public static function getDomainSorted(array $emails): array
    {
        $domains = self::getDomain($emails);

        if (count($domains) < 2) {
            return $domains;
        }

        sort($domains, SORT_STRING);

        return $domains;
    }
public static function getDomainSorted(array $emails): array
    {
        $domains = self::getDomain($emails);

        if (count($domains) < 2) {
            return $domains;
        }

        sort($domains, SORT_STRING);

        return $domains;
    }
public static function getDomainSorted ( array $ emails ) : array { $ domains = self :: getDomain ( $ emails ) ; if ( count ( $ domains ) < 2 ) { return $ domains ; } sort ( $ domains , SORT_STRING ) ; return $ domains ; }
Get domains from email addresses in alphabetical order.

@param array $emails
@return array
Get domains from email addresses in alphabetical order .