Showing 371 of 658 total issues
Function remove
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
remove: function( elem, types, handler, selector, mappedTypes ) {
Function Tween
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function Tween( elem, options, prop, end, easing ) {
Function parseDateTimeInternal
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
var parseDateTimeInternal = function(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {
Function on
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
Function condense
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function condense( unmatched, map, filter, context, xml ) {
Function add
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
add: function( elem, types, handler, data, selector ) {
Function superMatcher
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
superMatcher = function( seed, context, xml, results, expandContext ) {
Function augmentWidthOrHeight
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
Function options
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
options: function(tp_inst, obj, unit, opts, val){
Function CHILD
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
"CHILD": function( type, what, argument, first, last ) {
Function options
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
options: function(tp_inst, obj, unit, opts, val){
Function parseDateTime
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$.datepicker.parseDateTime = function(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {
Method survey_check_box
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def survey_check_box(object_name, method, options = {}, checked_value = "1", unchecked_value = "0")
Method as
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def as(type_symbol)
return case type_symbol.to_sym
when :string, :text, :integer, :float, :datetime
self.send("#{type_symbol}_value".to_sym)
when :date
- 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 resolve_dependency_condition_references
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def resolve_dependency_condition_references
self.context[:dependency_conditions].each do |dc|
# Looking up references to questions and answers for linking the dependency objects
self.context[:bad_references].push "q_#{dc.question_reference}" unless (dc.question = self.context[:question_references][dc.question_reference])
self.context[:answer_references][dc.question_reference] ||= {}
- 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 unparse
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def unparse(dsl)
with_defaults = DependencyCondition.new
attrs = self.attributes.delete_if{|k,v| with_defaults[k] == v or %w(created_at updated_at question_id question_group_id rule_key rule operator id dependency_id answer_id).include? k}.symbolize_keys!
dsl << " " if dependency.question.part_of_group?
dsl << " condition"
- 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 questions_and_groups
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def questions_and_groups
qs = []
questions.each_with_index.map do |q,i|
if q.part_of_group?
if (i+1 >= questions.size) or (q.question_group_id != questions[i+1].question_group_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
Method create
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create
surveys = Survey.where(:access_code => params[:survey_code]).order("survey_version DESC")
if params[:survey_version].blank?
@survey = surveys.first
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 unparse
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def unparse(dsl)
with_defaults = QuestionGroup.new(:text => text)
attrs = self.attributes.delete_if{|k,v| with_defaults[k] == v or %w(created_at updated_at id api_id).include?(k) or (k == "display_type" && %w(grid repeater default).include?(v))}.symbolize_keys!
method = (%w(grid repeater).include?(display_type) ? display_type : "group")
dsl << "\n"
- 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 migrations
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def migrations
unless options[:skip_migrations]
check_for_orphaned_migration_files
# increment migration timestamps to prevent collisions. copied functionality from RAILS_GEM_PATH/lib/rails_generator/commands.rb
- 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"