killbill/killbill-litle-plugin

View on GitHub

Showing 14 of 14 total issues

Method from_response has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

      def self.from_response(api_call, kb_account_id, kb_payment_id, kb_payment_transaction_id, transaction_type, payment_processor_account_id, kb_tenant_id, response, extra_params = {}, model = ::Killbill::Litle::LitleResponse)
Severity: Major
Found in lib/litle/models/response.rb - About 1 hr to fix

    Method capture_payment has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

          def capture_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
    Severity: Major
    Found in lib/litle/api.rb - About 1 hr to fix

      Method from_response has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

            def self.from_response(kb_account_id, kb_payment_method_id, kb_tenant_id, cc_or_token, response, options, extra_params = {}, model = ::Killbill::Litle::LitlePaymentMethod)
      Severity: Major
      Found in lib/litle/models/payment_method.rb - About 1 hr to fix

        Method refund_payment has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

              def refund_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
        Severity: Major
        Found in lib/litle/api.rb - About 1 hr to fix

          Method purchase_payment has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                def purchase_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
          Severity: Major
          Found in lib/litle/api.rb - About 1 hr to fix

            Method credit_payment has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                  def credit_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
            Severity: Major
            Found in lib/litle/api.rb - About 1 hr to fix

              Method authorize_payment has 8 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                    def authorize_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, amount, currency, properties, context)
              Severity: Major
              Found in lib/litle/api.rb - About 1 hr to fix

                Method void_payment has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                      def void_payment(kb_account_id, kb_payment_id, kb_payment_transaction_id, kb_payment_method_id, properties, context)
                Severity: Minor
                Found in lib/litle/api.rb - About 45 mins to fix

                  Method add_payment_method has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                        def add_payment_method(kb_account_id, kb_payment_method_id, payment_method_props, set_default, properties, context)
                  Severity: Minor
                  Found in lib/litle/api.rb - About 45 mins to fix

                    Method search_payments has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                          def search_payments(search_key, offset, limit, properties, context)
                    Severity: Minor
                    Found in lib/litle/api.rb - About 35 mins to fix

                      Method search_payment_methods has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                            def search_payment_methods(search_key, offset, limit, properties, context)
                      Severity: Minor
                      Found in lib/litle/api.rb - About 35 mins to fix

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

                              def add_payment_method(kb_account_id, kb_payment_method_id, payment_method_props, set_default, properties, context)
                                # paypageRegistrationId is passed via properties
                                paypage_registration_id = find_value_from_properties(properties, 'paypageRegistrationId')
                                # paypageRegistrationId is passed from the json body
                                paypage_registration_id = find_value_from_properties(payment_method_props.properties, 'paypageRegistrationId') if paypage_registration_id.nil?
                        Severity: Minor
                        Found in lib/litle/api.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 parse has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                              def parse(kind, xml)
                                parsed = {}
                        
                                doc = Nokogiri::XML(xml).remove_namespaces!
                                response_nodes = doc.xpath("//litleOnlineResponse/#{kind}Response")
                        Severity: Minor
                        Found in lib/litle.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 each has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def each(&block)
                              (0..(@limit - @batch)).step(@batch) do |i|
                                result = @delegate.call(i, @batch)
                                block.call(result)
                                # Optimization: bail out if no more results
                        Severity: Minor
                        Found in lib/litle/litle_utils.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