Showing 6 of 6 total issues
Method collect_reminders
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
def collect_reminders
reminders = {}
issues = issues_due_in_days
issues.each do |issue|
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method reminder_all
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def reminder_all(user, assigned_issues, auth_issues, watched_issues, custom_user_issues, days)
recipients = user.mail
day_tag = [l(:mail_reminder_all_day1), l(:mail_reminder_all_day2),
l(:mail_reminder_all_day2), l(:mail_reminder_all_day2),
l(:mail_reminder_all_day5)]
Method collect_reminders
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def collect_reminders
reminders = {}
issues = issues_due_in_days
issues.each do |issue|
Method reminder_all
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def reminder_all(user, assigned_issues, auth_issues, watched_issues, custom_user_issues, days)
Method deliver_reminder_all_if_any
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def self.deliver_reminder_all_if_any(user, assigned_issues, auth_issues, watched_issues, custom_user_issues, days)
Method set_default_values
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def set_default_values
self.days ||= 7
self.issue_status_selector ||= ALL_OPENED
self.project_selector ||= ALL
self.tracker_selector ||= ALL
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"