haslo/lists_juggle_browser

View on GitHub
app/models/rankers/ship_combos_ranker.rb

Summary

Maintainability
A
3 hrs
Test Coverage

Showing 2 of 2 total issues

Method initialize has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def initialize(ranking_configuration, ship_id: nil, ship_combo_id: nil, pilot_id: nil, upgrade_id: nil, limit: nil)
start_date = ranking_configuration[:ranking_start]
end_date = ranking_configuration[:ranking_end]
tournament_type = ranking_configuration[:tournament_type]
joins = <<-SQL
Severity: Major
Found in app/models/rankers/ship_combos_ranker.rb - About 2 hrs to fix

    Method initialize has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    def initialize(ranking_configuration, ship_id: nil, ship_combo_id: nil, pilot_id: nil, upgrade_id: nil, limit: nil)
    start_date = ranking_configuration[:ranking_start]
    end_date = ranking_configuration[:ranking_end]
    tournament_type = ranking_configuration[:tournament_type]
    joins = <<-SQL
    Severity: Minor
    Found in app/models/rankers/ship_combos_ranker.rb - About 25 mins to fix
    Category
    Status