Method add_extra_customizations
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def add_extra_customizations
# We can't know everything from the wsdl, like which fields are
# usable in queries. This function does some final customizations
# based on the existing Zuora documentation.
# Also, it's possible classes customized here weren't defined
- 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 add_extra_customizations
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
def add_extra_customizations
# We can't know everything from the wsdl, like which fields are
# usable in queries. This function does some final customizations
# based on the existing Zuora documentation.
# Also, it's possible classes customized here weren't defined
Method generate_classes
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
def generate_classes
# Defines the classes based on the wsdl document.
# Assumes the following namespaces in the wsdl.
# xmlns="http://schemas.xmlsoap.org/wsdl/"
Method add_obvious_associations
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def add_obvious_associations
# When a zuora class has a field called InvoiceId, it's a safe
# assuption that it references the an Invoice.
# Build those associations automatically.
@classes.each do |zuora_class|
- 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 generate_classes
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def generate_classes
# Defines the classes based on the wsdl document.
# Assumes the following namespaces in the wsdl.
# xmlns="http://schemas.xmlsoap.org/wsdl/"
- 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"