Showing 9 of 198 total issues
Method getDescArrayForProperties
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def getDescArrayForProperties(aCols = nil)
aVals = []
return aVals if aCols.nil?
aCols.each do |yKey|
yKey = yKey.to_sym if yKey.is_a? String
- 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 initialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def initialize(dValues=nil,dSchema=nil,bDefaultifyDoc=false,bIsStrict=true,opts={})
@dSchema = dSchema || self.getDefaultSchema()
@bDefaultifyDoc = bDefaultifyDoc ? true : false
@bIsStrict = bIsStrict ? true : false
@bUseKeyAsDesc = false
- 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 validateKey
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def validateKey(yKey = nil)
raise ArgumentError, "E_BAD_KEY__IS_NIL [#{yKey.to_s}]" if yKey.nil?
return true unless @bIsStrict
- 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 initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(dValues=nil,dSchema=nil,bDefaultifyDoc=false,bIsStrict=true,opts={})
Method getDefaultDocument
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def getDefaultDocument
dDocument = {}
if @bDefaultifyDoc && @dSchema.key?(:properties)
@dSchema[:properties].keys.each do |yKey|
dProperty = @dSchema[:properties][yKey]
- 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 getPropRecurse
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def getPropRecurse(aKeys = [], dDoc = nil)
yKey = aKeys.shift
if ! yKey.is_a?(Symbol) || yKey.length<1 || ! dDoc.key?( yKey )
return nil
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 getPropSingle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def getPropSingle(yKey = nil)
raise ArgumentError, 'E_BAD_KEY__IS_NIL' if yKey.nil?
yKey = yKey.to_sym if yKey.is_a?(String)
xxVal = @dDocument.key?(yKey) ? @dDocument[yKey] : nil
if xxVal.nil? && @bIsStrict
- 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 pushProp
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def pushProp(yKey = nil, xxVal = nil)
yKey = yKey.to_sym if yKey.is_a?(String)
self.validateKey(yKey)
if @dDocument.key?(yKey)
- 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 getValArrayForProperties
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def getValArrayForProperties(aCols = nil, xxNil = '')
aVals = []
return aVals if aCols.nil?
if @bUseKeyAsDesc
- 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"