fadendaten/six_saferpay

View on GitHub

Showing 15 of 92 total issues

Method to_hash has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def to_hash
      hash = Hash.new
      if !@has_account.nil?
        hash.merge!(has_account: @has_account)
      end
Severity: Minor
Found in lib/six_saferpay/models/payer_profile.rb - About 1 hr to fix

    Method to_hash has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def to_hash
          hash = Hash.new
          if !@has_account.nil?
            hash.merge!(has_account: @has_account)
          end
    Severity: Minor
    Found in lib/six_saferpay/models/payer_profile.rb - About 1 hr 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 to_hash has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

        def to_hash
          hash = Hash.new
          hash.merge!(type: @type) if @type
          hash.merge!(id: @id) if @id
          hash.merge!(variant_id: @variant_id) if @variant_id
    Severity: Minor
    Found in lib/six_saferpay/models/item.rb - About 1 hr 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 to_hash has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

          def to_hash
            hash = Hash.new
            hash.merge!(request_header: @request_header.to_h) if @request_header
            hash.merge!(register_alias: @register_alias.to_h) if @register_alias
            hash.merge!(type: @type) if @type
    Severity: Minor
    Found in lib/six_saferpay/api/six_secure_card_data/requests/insert.rb - About 1 hr 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 initialize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

          def initialize(request_header: nil,
                         register_alias:,
                         type:,
                         return_urls:,
                         styling: nil,
    Severity: Minor
    Found in lib/six_saferpay/api/six_secure_card_data/requests/insert.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

    Method initialize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

          def initialize(response_header:,
                         transaction:,
                         payment_means:,
                         payer: nil,
                         registration_result: nil,

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

          def to_hash
            hash = Hash.new
            hash.merge!(response_header: @response_header.to_h) if @response_header
            hash.merge!(transaction: @transaction.to_h) if @transaction
            hash.merge!(payment_means: @payment_means.to_h) if @payment_means

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

          def to_hash
            hash = Hash.new
            hash.merge!(response_header: @response_header.to_h) if @response_header
            hash.merge!(transaction: @transaction.to_h) if @transaction
            hash.merge!(payment_means: @payment_means.to_h) if @payment_means
    Severity: Minor
    Found in lib/six_saferpay/api/six_transaction/responses/inquire_response.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 initialize has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

          def initialize(response_header:,
                         transaction:,
                         payment_means:,
                         payer: nil,
                         liability: nil,
    Severity: Minor
    Found in lib/six_saferpay/api/six_transaction/responses/inquire_response.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 to_hash has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        def to_hash
          hash = Hash.new
          hash.merge!(number_of_installments: @number_of_installments)
          if @interest_rate
            hash.merge!(interest_rate: @interest_rate)
    Severity: Minor
    Found in lib/six_saferpay/models/installment_plans.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 initialize has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

          def initialize(response_header:,
                        transaction:,
                        payment_means:,
                        payer: nil,
                        registration_result: nil,
    Severity: Minor
    Found in lib/six_saferpay/api/six_payment_page/responses/assert_response.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 to_hash has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        def to_hash
          hash = Hash.new
          hash.merge!(id: @id) if @id
          hash.merge!(ip_address: @ip_address) if @ip_address
          hash.merge!(ip_location: @ip_location) if @ip_location
    Severity: Minor
    Found in lib/six_saferpay/models/payer.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 to_hash has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

          def to_hash
            hash = Hash.new
            hash.merge!(response_header: @response_header.to_h) if @response_header
            hash.merge!(transaction: @transaction.to_h) if @transaction
            hash.merge!(payment_means: @payment_means.to_h) if @payment_means

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

          def to_hash
            hash = Hash.new
            hash.merge!(request_header: @request_header.to_h) if @request_header
            hash.merge!(terminal_id: @terminal_id) if @terminal_id
            hash.merge!(payment: @payment.to_h) if @payment
    Severity: Minor
    Found in lib/six_saferpay/api/six_transaction/requests/authorize_referenced.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 to_hash has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

          def to_hash
            hash = Hash.new
            hash.merge!(payment: @payment.to_h) if @payment
            hash.merge!(expiration_date: @expiration_date) if @expiration_date
            hash.merge!(config_set: @config_set) if @config_set
    Severity: Minor
    Found in lib/six_saferpay/api/six_secure_pay_gate_offer/requests/create_offer.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