Why this matters
Simplifies callers and prevents conditional type checks.
A method should return the same type in all code paths (e.g., always an array or always nil/record).
Simplifies callers and prevents conditional type checks.
Side-by-side examples engineers can pattern-match during review.
def ids; return [] if none?; return find_ids; enddef ids; return [] if none?; find_ids || []; endsometimes String, sometimes nilalways returns ArrayFrom the same buckets as this rule.