Showing 338 of 416 total issues
Class ClassDefCreator
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class ClassDefCreator
include ClassDefCreatorSupport
include XSD::CodeGen
def initialize(definitions, name_creator, modulepath = nil)
Class Definitions
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class Definitions < Info
attr_reader :name
attr_reader :targetnamespace
attr_reader :imports
Class Router
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class Router
include SOAP
attr_reader :actor
attr_accessor :mapping_registry
Method parse_elements
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
def parse_elements(c, elements, base_namespace, mpath, as_array = false)
init_lines = []
init_params = []
any = false
elements.each do |element|
Method parse_opt
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def parse_opt(getoptlong)
opt = {}
wsdl = nil
begin
getoptlong.each do |name, arg|
- 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 obj2soap
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def obj2soap(obj)
klass = obj.class
if map = @obj2soap[klass]
map.each do |soap_class, factory, info|
ret = factory.obj2soap(soap_class, obj, info, @registry)
- 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 decode_soap_envelope
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def decode_soap_envelope(ns, ele, attrs, parent)
o = nil
if ele.name == EleEnvelope
o = SOAPEnvelope.new
if ext = @opt[:external_content]
- 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
Class Operation
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class Operation
attr_reader :soapaction
attr_reader :request_style
attr_reader :response_style
attr_reader :request_use
Class Generator
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class Generator
include SOAP
include XSD::CodeGen::GenSupport
class FormatEncodeError < Error; end
Class SOAPArray
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class SOAPArray < XSD::NSDBase
include SOAPCompoundtype
include Enumerable
public
Method rubytypestruct2obj
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def rubytypestruct2obj(node, info, map, rubytype)
klass = rubytype ? Mapping.class_from_name(rubytype) : nil
obj = nil
case node.type
when TYPE_HASH
Method create_array_element_definition
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def create_array_element_definition(typedef, mpath)
child_type = typedef.child_type
child_element = typedef.find_aryelement
if child_type == XSD::AnyTypeName
type = nil
- 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 parse_attr
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def parse_attr(attr, value)
case attr
when NamespaceAttrName
@namespace = value.source
if @content
- 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_schema_definition
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def self.create_schema_definition(klass, definition)
schema_ns = definition[:schema_ns]
schema_name = definition[:schema_name]
schema_type = definition[:schema_type]
is_anonymous = definition[:is_anonymous]
- 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 dump_porttype
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
def dump_porttype(porttype)
drivername = porttype.name + @drivername_postfix
qname = XSD::QName.new(porttype.namespace, drivername)
class_name = mapped_class_basename(qname, @modulepath)
defined_const = {}
Method screen_data
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def screen_data(value)
# "NaN".to_f => 0 in some environment. libc?
if value.is_a?(Float)
return value
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 parse_attr
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def parse_attr(attr, value)
case attr
when NameAttrName
@name = XSD::QName.new(targetnamespace, value.source)
when RefAttrName
- 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 const_from_name
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def self.const_from_name(name, lenient = false)
const = ::Object
name.sub(/\A::/, '').split('::').each do |const_str|
if /\A[A-Z]/ =~ const_str
begin
- 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 _soap2obj
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def _soap2obj(node, klass = nil)
definition = find_node_definition(node)
if klass
klass_definition = schema_definition_from_class(klass)
if definition and (definition.class_for < klass)
- 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 from_obj
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def self.from_obj(obj, namespace = nil)
return obj if obj.is_a?(SOAPElement)
o = SOAPElement.new(nil)
case obj
when nil
- 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"