coyosoftware/vpsa

View on GitHub

Showing 11 of 19 total issues

Class Client has 21 methods (exceeds 20 allowed). Consider refactoring.
Open

  class Client
    extend Vpsa::ClassMethods
    include HTTParty
    
    #debug_output $stdout
Severity: Minor
Found in lib/vpsa/client.rb - About 2 hrs to fix

    Method list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

          def list(searcher = nil)
            raise ArgumentError unless searcher.nil? || searcher.is_a?(Vpsa::Searcher::Financial::DefaultEntrySearcher)
            
            return parse_response(self.class.get("/", :body => build_body(searcher.as_parameter), :headers => header)) if searcher
            return parse_response(self.class.get("/", :body => build_body, :headers => header)) unless searcher
    Severity: Minor
    Found in lib/vpsa/api/default_entries.rb - About 25 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 list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

          def list(searcher = nil)
            raise ArgumentError unless searcher.nil? || searcher.is_a?(Vpsa::Searcher::Administrative::ThirdPartySearcher)
            
            return parse_response(self.class.get("/", :body => build_body(searcher.as_parameter),  :headers => header)) if searcher
            return parse_response(self.class.get("/", :body => build_body,  :headers => header)) unless searcher
    Severity: Minor
    Found in lib/vpsa/api/third_parties.rb - About 25 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 list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

          def list(searcher = nil)
            raise ArgumentError unless searcher.nil? || searcher.is_a?(Vpsa::Searcher::Operational::SellerSearcher)
            
            return parse_response(self.class.get("/", :body => build_body(searcher.as_parameter),  :headers => header)) if searcher
            return parse_response(self.class.get("/", :body => build_body,  :headers => header)) unless searcher
    Severity: Minor
    Found in lib/vpsa/api/sellers.rb - About 25 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 list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

            def list(searcher = nil)
                raise ArgumentError unless searcher.nil? || searcher.is_a?(Vpsa::Searcher::Financial::ReceiptSearcher)
                
                return parse_response(self.class.get("/", :body => build_body(searcher.as_parameter),  :headers => header)) if searcher
                return parse_response(self.class.get("/", :body => build_body,  :headers => header)) unless searcher
    Severity: Minor
    Found in lib/vpsa/api/receipts.rb - About 25 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 list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

          def list(searcher = nil)
            raise ArgumentError unless searcher.nil? || searcher.is_a?(Vpsa::Searcher::Operational::ClientClassSearcher)
            
            return parse_response(self.class.get("/", :body => build_body(searcher.as_parameter),  :headers => header)) if searcher
            return parse_response(self.class.get("/", :body => build_body,  :headers => header)) unless searcher
    Severity: Minor
    Found in lib/vpsa/api/client_classes.rb - About 25 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 list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

          def list(searcher = nil)
            raise ArgumentError unless searcher.nil? || searcher.is_a?(Vpsa::Searcher::Administrative::CompanySearcher)
            
            return parse_response(self.class.get("/", :body => build_body(searcher.as_parameter),  :headers => header)) if searcher
            return parse_response(self.class.get("/", :body => build_body,  :headers => header)) unless searcher
    Severity: Minor
    Found in lib/vpsa/api/companies.rb - About 25 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 list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

          def list(searcher = nil)
            raise ArgumentError unless searcher.nil? || searcher.is_a?(Vpsa::Searcher::Administrative::EntitySearcher)
            
            return parse_response(self.class.get("/", :body => build_body(searcher.as_parameter),  :headers => header)) if searcher
            return parse_response(self.class.get("/", :body => build_body,  :headers => header)) unless searcher
    Severity: Minor
    Found in lib/vpsa/api/entities.rb - About 25 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 list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

            def list(searcher = nil)
                raise ArgumentError unless searcher.nil? || searcher.is_a?(Vpsa::Searcher::Commercial::CreditLimitSearcher)
                
                return parse_response(self.class.get("/", :body => build_body(searcher.as_parameter),  :headers => header)) if searcher
                return parse_response(self.class.get("/", :body => build_body,  :headers => header)) unless searcher
    Severity: Minor
    Found in lib/vpsa/api/credit_limits.rb - About 25 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 list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

          def list(searcher = nil)
            raise ArgumentError unless searcher.nil? || searcher.is_a?(Vpsa::Searcher::Operational::OrderSearcher)
            
            return parse_response(self.class.get("/", :body => build_body(searcher.as_parameter),  :headers => header)) if searcher
            return parse_response(self.class.get("/", :body => build_body,  :headers => header)) unless searcher
    Severity: Minor
    Found in lib/vpsa/api/orders.rb - About 25 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 list has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

          def list(searcher = nil)
            raise ArgumentError unless searcher.nil? || searcher.is_a?(Vpsa::Searcher::Financial::PaymentConditionSearcher)
    
            return parse_response(self.class.get("/", :body => build_body(searcher.as_parameter),  :headers => header)) if searcher
            return parse_response(self.class.get("/", :body => build_body,  :headers => header)) unless searcher
    Severity: Minor
    Found in lib/vpsa/api/payment_conditions.rb - About 25 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

    Severity
    Category
    Status
    Source
    Language