3scale/pisoni

View on GitHub

Showing 5 of 5 total issues

Method api has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

def api(method, attributes, options = {})
prefix = options.fetch(:prefix, default_prefix)
attributes = { prefix => attributes } unless prefix.empty? or attributes.empty?
uri = options.fetch(:uri, default_uri)
 
 
Severity: Minor
Found in lib/3scale/core/api_client/operations.rb - About 2 hrs to fix

Method api has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def api(method, attributes, options = {})
prefix = options.fetch(:prefix, default_prefix)
attributes = { prefix => attributes } unless prefix.empty? or attributes.empty?
uri = options.fetch(:uri, default_uri)
 
 
Severity: Minor
Found in lib/3scale/core/api_client/operations.rb - About 1 hr to fix

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

    def api_response_inspect(method, uri, response, attributes, after, before)
    Severity: Minor
    Found in lib/3scale/core/api_client/operations.rb - About 45 mins to fix

      Consider simplifying this complex logical expression.
      Open

      raise ApplicationHasInconsistentData.new(id, user_key) if (service_id.nil? || id.nil? || user_key.nil? || service_id=="" || id=="" || user_key=="")
      Severity: Major
      Found in lib/3scale/core/application.rb - About 40 mins to fix

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

        def save!(attributes)
        api_do_post(attributes, prefix: :service_tokens) do |result|
         
        status = result[:response].status
         
         
        Severity: Minor
        Found in lib/3scale/core/service_token.rb - About 35 mins to fix
        Severity
        Category
        Status
        Source
        Language