Showing 180 of 222 total issues
Method check_early_access_restrictions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def check_early_access_restrictions
if paid_period_expired? && access_to_this_action_restricted?
if current_user && true # (not current_user.early_access?)
enforce_early_access_restriction
end
- 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 change_status
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def change_status(new_status, options = {})
corporation_token = options[:in]
corp = if self.current_corporations.count == 1
print "Ignoriere :in-Option, da nur ein Band vorliegt.\n" if corporation_token
self.current_corporations.first
- 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 import_bv_membership_from
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def import_bv_membership_from( netenv_user )
reset_bv_memberships
if netenv_user.bv
membership = netenv_user.bv.assign_user self, at: netenv_user.bv_beitrittsdatum
membership.needs_review! if netenv_user.bv_beitrittsdatum_geschätzt?
- 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
Avoid too many return
statements within this function. Open
return el.show();
Avoid too many return
statements within this method. Open
return self.find_by_token("BV 46") if country_code.present?
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return el.hide();
Avoid too many return
statements within this function. Open
return el.hide();
Avoid too many return
statements within this function. Open
return $.get(path, function (response) {
el.html(response);
el.data(self.data_attr + '-last-path', path);
trigger();
});
Avoid too many return
statements within this function. Open
return el.show();
Avoid too many return
statements within this method. Open
return self.find_by_token("BV 00")
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return $.get(path, function (response) {
el.html(response);
el.data(self.data_attr + '-last-path', path);
trigger();
});
Method change_group_id_according_to_aktive_and_philister
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def change_group_id_according_to_aktive_and_philister
if group_id && (corporation = group.corporation) && @scope_has_changed
@scope_has_changed = false
if aktive and philister
self.move_to corporation
- 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 rights_for_local_admins
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def rights_for_local_admins
can :index, PublicActivity::Activity
can :index, Issue
if not read_only_mode?
- 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 status_export_string
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def status_export_string
self.corporations.collect do |corporation|
if membership = self.current_status_membership_in(corporation)
"#{membership.group.name.singularize} im #{corporation.name} seit #{I18n.localize(membership.valid_from.to_date) if membership.valid_from}"
else
- 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 to_datetime
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def to_datetime
self.replace_flaws!
if self.blank?
return nil
- 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 type_of_study
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def type_of_study
# "Bachelor/Master", "Diplom", "Kirchliche Prüfung", "Magister", "Promotion", "Staatsprüfung"
type = data_hash_value :epdwingolfedustudystatus
type = "Bachelor-Master-Studium" if type == "Bachelor/Master"
type = "Diplom-Studium" if type == "Diplom"
- 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"