Method normalize_title
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def normalize_title(arg_title, options = {})
# default options
options[:rstrip_parens] ||= true
options[:remove_all_parens] ||= true
options[:strip_gmd] ||= true
- 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 get_identifier
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def get_identifier(type, sub_scheme, referent, options = {} )
options[:multiple] ||= false
raise Exception.new("type must be :urn or :info") unless type == :urn or type == :info
- 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 raw_search_title
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def raw_search_title(rft)
# Just make one call to create metadata hash
metadata = rft.metadata
title = nil
if rft.format == 'journal' && metadata['atitle']
- 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 get_sudoc
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_sudoc(rft)
# Don't forget to unescape the sudoc that was escaped to maek it a uri!
# Option 1: In a technically illegal but oh well info:sudoc uri
- 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"