app/models/concerns/rankable.rb
Showing 3 of 3 total issues
Method <=>
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def <=>(other) RANKING_PRIORITY.each do |attr| difference = other.stats.send(attr) - stats.send(attr) next if difference.zero? return attr.include?('ranks') ? -1 * difference : difference
- Read upRead up
- Create a ticketCreate a ticket
Add an empty line after magic comments. Open
Open
module Rankable
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
%w
-literals should be delimited by [
and ]
. Open
Open
RANKING_PRIORITY = %w(speaks ranks single_adjusted_speaks single_adjusted_ranks double_adjusted_speaks
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks