class RuboCop::Cop::Style::ParallelAssignment

def on_masgn(node)

def on_masgn(node)
  left, right = *node
  left_elements = *left
  right_elements = [*right].compact # edge case for one constant
  # only complain when the number of variables matches
  return if left_elements.size != right_elements.size
  # account for edge cases using one variable with a comma
  return if left_elements.size == 1
  # account for edge case of Constant::CONSTANT
  return unless right.array_type?
  # allow mass assignment as the return of a method call
  return if right.block_type? || right.send_type?
  # allow mass assignment when using splat
  return if (left_elements + right_elements).any?(&:splat_type?)
  order = find_valid_order(left_elements, right_elements)
  # For `a, b = b, a` or similar, there is no valid order
  return if order.nil?
  add_offense(node, :expression)
end