module RuboCop::Cop::MinBranchesCount

def if_conditional_branches(node, branches = [])

def if_conditional_branches(node, branches = [])
  return [] if node.nil? || !node.if_type?
  branches << node.if_branch
  else_branch = node.else_branch
  if_conditional_branches(else_branch, branches) if else_branch&.if_type?
  branches
end