rubyjedi/soap4r

View on GitHub
lib/wsdl/soap/definitions.rb

Summary

Maintainability
C
1 day
Test Coverage

Method collect_fault_messages has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
Open

  def collect_fault_messages
    result = []
    porttypes.each do |porttype|
      port_binding = porttype.find_binding()
      next unless port_binding
Severity: Minor
Found in lib/wsdl/soap/definitions.rb - About 5 hrs to fix

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 collect_fault_messages has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def collect_fault_messages
    result = []
    porttypes.each do |porttype|
      port_binding = porttype.find_binding()
      next unless port_binding
Severity: Minor
Found in lib/wsdl/soap/definitions.rb - About 1 hr to fix

    Method rpc_operation_complextypes has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

      def rpc_operation_complextypes(binding)
        types = XSD::NamedElements.new
        binding.operations.each do |op_bind|
          if op_bind_rpc?(op_bind)
        operation = op_bind.find_operation
    Severity: Minor
    Found in lib/wsdl/soap/definitions.rb - About 45 mins to fix

    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 collect_faulttypes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

      def collect_faulttypes
        result = []
        collect_fault_messages.each do |name|
          faultparts = message(name).parts
          if faultparts.size != 1
    Severity: Minor
    Found in lib/wsdl/soap/definitions.rb - About 35 mins to fix

    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

    There are no issues that match your filters.

    Category
    Status