<commit_before># frozen_string_literal: true

class AlertMailer < ApplicationMailer
  def self.send_alert_email(alert, recipient)
    return unless Features.email?
    alert(alert, recipient).deliver_now
  end

  def alert(alert, recipient)
    return unless Features.email?
    @recipient = recipient
    @alert = alert
    @type = @alert.type
    @article = @alert.article
    @message = @alert.message
    @resolvable = @alert.resolvable?
    @details = @alert.details
    params = { to: @recipient.email,
               subject: "#{@type}: #{@alert.main_subject}" }
    params[:reply_to] = @alert.reply_to unless @alert.reply_to.nil?
    mail(params)
  end
end<commit_msg>Remove duplicate guard clause<commit_after># frozen_string_literal: true

class AlertMailer < ApplicationMailer
  def self.send_alert_email(alert, recipient)
    return unless Features.email?
    alert(alert, recipient).deliver_now
  end

  def alert(alert, recipient)
    @recipient = recipient
    @alert = alert
    @type = @alert.type
    @article = @alert.article
    @message = @alert.message
    @resolvable = @alert.resolvable?
    @details = @alert.details
    params = { to: @recipient.email,
               subject: "#{@type}: #{@alert.main_subject}" }
    params[:reply_to] = @alert.reply_to unless @alert.reply_to.nil?
    mail(params)
  end
end
{'fraction_non_alphanumeric': 0.11544227886056972, 'fraction_numerical': 0.0, 'mean_word_length': 3.510135135135135, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5079790', 'n_tokens_mistral': 426, 'n_tokens_neox': 417, 'n_words': 95}