app/models/importers/ranking.rb
Showing 3 of 3 total issues
Method build_ranking_data
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
Open
def build_ranking_data(tournament_id) if (tournament_id.to_f / 50) == (tournament_id.to_i / 50) print "#{tournament_id}." else print '.'
- Read upRead up
Method build_ranking_data
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def build_ranking_data(tournament_id) if (tournament_id.to_f / 50) == (tournament_id.to_i / 50) print "#{tournament_id}." else print '.'
Method rebuild_all_ranking_data
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def rebuild_all_ranking_data(minimum_id: nil, start_date: nil) Tournament.includes(:squadrons).all.each do |tournament| if minimum_id.nil? || tournament.lists_juggler_id >= minimum_id if start_date.nil? || tournament.date.nil? || tournament.date >= DateTime.parse(start_date.to_s).beginning_of_day build_ranking_data(tournament.lists_juggler_id)
- Read upRead up