class RuboCop::Cop::InternalAffairs::StyleDetectedApiUse

Checks for correct use of the style_detected API provided by ‘ConfigurableEnforcedStyle`. If `correct_style_detected` is used then `opposite_style_detected`, `unexpected_style_detected`, `ambiguous_style_detected`, `conflicting_styles_detected`, `unrecognized_style_detected` or `no_acceptable_style!` should be used too, and vice versa. The `xxx_style_detected` methods should not be used as predicates either.

@example

# bad
def on_send(node)
  return add_offense(node) if opposite_style_detected

  correct_style_detected
end

def on_send(node)
  if offense?
    add_offense(node)
  else
    correct_style_detected
  end
end

def on_send(node)
  return unless offense?

  add_offense(node)
  opposite_style_detected
end

# good
def on_send(node)
  if offense?
    add_offense(node)
    opposite_style_detected
  else
    correct_style_detected
  end
end

def on_send(node)
  add_offense(node) if offense?
end