Showing 222 of 222 total issues
Method fix_netenv_aktivitätszahl_format
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def fix_netenv_aktivitätszahl_format(str)
if str
str = remove_brackets(str)
str = str.gsub(";", ",")
str = str.gsub(/^,/, "").gsub(/,$/, "")
- 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 deeply nested control flow statements. Open
if (this.settings.timer > 0) {
this.settings.$next_tip
.fadeIn(this.settings.tip_animation_fade_speed)
.show();
Method in_allen_verbindungen_philistrieren!
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def in_allen_verbindungen_philistrieren!
raise "Noch kein Philister. Das geht nur, wenn er schon in einer Verbindung Philister ist." unless philistrationsdatum
self.current_corporations.each do |corporation|
unless self.member_of? corporation.philisterschaft
status_group_ids_in_this_corporation = StatusGroup.find_all_by_group(corporation.aktivitas).map(&:id)
- 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 deeply nested control flow statements. Open
if (self.S(klass).hasClass('fixed')) {
self.S(klass).removeClass('fixed');
self.S('body').removeClass('f-topbar-fixed');
}
Avoid deeply nested control flow statements. Open
if (this.settings.timer > 0) {
this.settings.$next_tip
.fadeIn(this.settings.tip_animation_fade_speed)
.show();
Avoid deeply nested control flow statements. Open
if (self.S(klass).hasClass('fixed')) {
self.S(klass).removeClass('fixed');
self.S('body').removeClass('f-topbar-fixed');
}
Method add_profile_field
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def add_profile_field( label, args )
raise 'no :type argument given' unless args[:type].present?
args[:type] = "ProfileFieldTypes::#{args[:type]}" unless args[:type].start_with? "ProfileFieldTypes::"
if (args[:force] or one_argument_present?(args))
args.delete(:force)
- 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_contact_profile_fields_from
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def import_contact_profile_fields_from( netenv_user )
add_profile_field :home_email, value: netenv_user.home_email, type: 'Email' unless netenv_user.home_email == netenv_user.email
add_profile_field :work_email, value: netenv_user.work_email, type: 'Email' unless netenv_user.work_email == netenv_user.email
home_address_field = add_profile_field netenv_user.home_address_label, value: netenv_user.home_address, type: 'Address'
- 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
Function normalized_value
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
normalized_value : function (val, start, end, step, precision) {
Function init
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
init : function (scope, libraries, method, options, response) {
Function init
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
init : function (scope, libraries, method, options, response) {
Function normalized_value
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
normalized_value : function (val, start, end, step, precision) {
Method create
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create
authorize! :create, User
authorize! :update, corporation
raise 'no corporation given' unless 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 personal_greeting
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def personal_greeting(options = {})
if self.wingolfit?
bbr = if self.aktiver?
"Bundesbruder"
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 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;