private static function fullyQualify(string $subdomain, string $parent): string
    {
        if ('@' === $subdomain) {
            return $parent;
        }

        if ('.' !== substr($subdomain, -1, 1)) {
            return $subdomain.'.'.$parent;
        }

        return $subdomain;
    }
private static function fullyQualify(string $subdomain, string $parent): string
    {
        if ('@' === $subdomain) {
            return $parent;
        }

        if ('.' !== substr($subdomain, -1, 1)) {
            return $subdomain.'.'.$parent;
        }

        return $subdomain;
    }
private static function fullyQualify ( string $ subdomain , string $ parent ) : string { if ( '@' === $ subdomain ) { return $ parent ; } if ( '.' !== substr ( $ subdomain , - 1 , 1 ) ) { return $ subdomain . '.' . $ parent ; } return $ subdomain ; }
Add the parent domain to the sub-domain if the sub-domain if it is not fully qualified.

@param string $subdomain
@param string $parent

@return string
Add the parent domain to the sub - domain if the sub - domain if it is not fully qualified .