public static function validateServiceName($serviceName)
    {
        if (!in_array($serviceName, self::getAvailableServices())) {
            throw new DomainException(sprintf("Notification service '%s' is not supported.", $serviceName));
        }
        return $serviceName;
    }
public static function validateServiceName($serviceName)
    {
        if (!in_array($serviceName, self::getAvailableServices())) {
            throw new DomainException(sprintf("Notification service '%s' is not supported.", $serviceName));
        }
        return $serviceName;
    }
public static function validateServiceName ( $ serviceName ) { if ( ! in_array ( $ serviceName , self :: getAvailableServices ( ) ) ) { throw new DomainException ( sprintf ( "Notification service '%s' is not supported." , $ serviceName ) ) ; } return $ serviceName ; }
Checks if notification service is supported

@param string $serviceName
@return string
@throws DomainException
Checks if notification service is supported