class RuboCop::Cop::Style::SoleNestedConditional

def offending_branch?(branch)

def offending_branch?(branch)
  return false unless branch
  branch.if_type? &&
    !branch.else? &&
    !branch.ternary? &&
    !(branch.modifier_form? && allow_modifier?)
end