gems-uff/sapos

View on GitHub
app/controllers/scholarship_durations_controller.rb

Summary

Maintainability
C
D
+6 hrs
Test Coverage

Showing 3 of 3 total issues

Method condition_for_suspended_column has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
New

def self.condition_for_suspended_column(column, value, like_pattern)
start_year = value[:start_year].present? ? value[:start_year].to_i : 1
end_year = value[:end_year].present? ? value[:end_year].to_i : 1
active = value[:active_suspension]
 
 
Severity: Minor
Found in app/controllers/scholarship_durations_controller.rb - About 2 hrs to fix

File scholarship_durations_controller.rb has 255 lines of code (exceeds 250 allowed). Consider refactoring.
New

class ScholarshipDurationsController < ApplicationController
authorize_resource
 
active_scaffold :scholarship_duration do |config|
config.action_links.add "to_pdf",
Severity: Minor
Found in app/controllers/scholarship_durations_controller.rb - About 2 hrs to fix

    Method condition_for_suspended_column has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    New

    def self.condition_for_suspended_column(column, value, like_pattern)
    start_year = value[:start_year].present? ? value[:start_year].to_i : 1
    end_year = value[:end_year].present? ? value[:end_year].to_i : 1
    active = value[:active_suspension]
     
     
    Severity: Minor
    Found in app/controllers/scholarship_durations_controller.rb - About 1 hr to fix
      Category
      Status