expressly/expressly-plugin-sdk-ruby-core

View on GitHub
lib/expressly/domain.rb

Summary

Maintainability
B
5 hrs
Test Coverage

File domain.rb has 407 lines of code (exceeds 250 allowed). Consider refactoring.
Open

module Expressly
  class CustomerImport
    attr_accessor :metadata, :primary_email, :customer, :cart
    def initialize(attribute_value_map = {})
      attribute_value_map.map { |(k, v)| public_send("#{k}=", v) }
Severity: Minor
Found in lib/expressly/domain.rb - About 5 hrs to fix

    Method Expressly::Phone#type= is defined at both lib/expressly/domain.rb:216 and lib/expressly/domain.rb:222.
    Open

        def type=(type)
    Severity: Minor
    Found in lib/expressly/domain.rb by rubocop

    This cop checks for duplicated instance (or singleton) method definitions.

    Example:

    # bad
    
    def duplicated
      1
    end
    
    def duplicated
      2
    end

    Example:

    # bad
    
    def duplicated
      1
    end
    
    alias duplicated other_duplicated

    Example:

    # good
    
    def duplicated
      1
    end
    
    def other_duplicated
      2
    end

    Method Expressly::Phone#country_code= is defined at both lib/expressly/domain.rb:216 and lib/expressly/domain.rb:227.
    Open

        def country_code=(country_code)
    Severity: Minor
    Found in lib/expressly/domain.rb by rubocop

    This cop checks for duplicated instance (or singleton) method definitions.

    Example:

    # bad
    
    def duplicated
      1
    end
    
    def duplicated
      2
    end

    Example:

    # bad
    
    def duplicated
      1
    end
    
    alias duplicated other_duplicated

    Example:

    # good
    
    def duplicated
      1
    end
    
    def other_duplicated
      2
    end

    Put one space between the method name and the first argument.
    Open

        attr_accessor  :email, :alias
    Severity: Minor
    Found in lib/expressly/domain.rb by rubocop

    Checks that exactly one space is used between a method name and the first argument for method calls without parentheses.

    Alternatively, extra spaces can be added to align the argument with something on a preceding or following line, if the AllowForAlignment config parameter is true.

    Example:

    # bad
    something  x
    something   y, z
    something'hello'
    
    # good
    something x
    something y, z
    something 'hello'

    Method Expressly::CustomerOrder#order_date= is defined at both lib/expressly/domain.rb:458 and lib/expressly/domain.rb:463.
    Open

        def order_date=(order_date)
    Severity: Minor
    Found in lib/expressly/domain.rb by rubocop

    This cop checks for duplicated instance (or singleton) method definitions.

    Example:

    # bad
    
    def duplicated
      1
    end
    
    def duplicated
      2
    end

    Example:

    # bad
    
    def duplicated
      1
    end
    
    alias duplicated other_duplicated

    Example:

    # good
    
    def duplicated
      1
    end
    
    def other_duplicated
      2
    end

    Method Expressly::Address#phone_index= is defined at both lib/expressly/domain.rb:153 and lib/expressly/domain.rb:160.
    Open

        def phone_index=(phone_index)
    Severity: Minor
    Found in lib/expressly/domain.rb by rubocop

    This cop checks for duplicated instance (or singleton) method definitions.

    Example:

    # bad
    
    def duplicated
      1
    end
    
    def duplicated
      2
    end

    Example:

    # bad
    
    def duplicated
      1
    end
    
    alias duplicated other_duplicated

    Example:

    # good
    
    def duplicated
      1
    end
    
    def other_duplicated
      2
    end

    Method Expressly::Customer#gender= is defined at both lib/expressly/domain.rb:66 and lib/expressly/domain.rb:75.
    Open

        def gender=(gender)
    Severity: Minor
    Found in lib/expressly/domain.rb by rubocop

    This cop checks for duplicated instance (or singleton) method definitions.

    Example:

    # bad
    
    def duplicated
      1
    end
    
    def duplicated
      2
    end

    Example:

    # bad
    
    def duplicated
      1
    end
    
    alias duplicated other_duplicated

    Example:

    # good
    
    def duplicated
      1
    end
    
    def other_duplicated
      2
    end

    Put one space between the method name and the first argument.
    Open

        attr_accessor  :type, :number, :country_code
    Severity: Minor
    Found in lib/expressly/domain.rb by rubocop

    Checks that exactly one space is used between a method name and the first argument for method calls without parentheses.

    Alternatively, extra spaces can be added to align the argument with something on a preceding or following line, if the AllowForAlignment config parameter is true.

    Example:

    # bad
    something  x
    something   y, z
    something'hello'
    
    # good
    something x
    something y, z
    something 'hello'

    Method Expressly::Customer#date_of_birth= is defined at both lib/expressly/domain.rb:66 and lib/expressly/domain.rb:80.
    Open

        def date_of_birth=(date_of_birth)
    Severity: Minor
    Found in lib/expressly/domain.rb by rubocop

    This cop checks for duplicated instance (or singleton) method definitions.

    Example:

    # bad
    
    def duplicated
      1
    end
    
    def duplicated
      2
    end

    Example:

    # bad
    
    def duplicated
      1
    end
    
    alias duplicated other_duplicated

    Example:

    # good
    
    def duplicated
      1
    end
    
    def other_duplicated
      2
    end

    Method Expressly::Customer#last_updated= is defined at both lib/expressly/domain.rb:66 and lib/expressly/domain.rb:85.
    Open

        def last_updated=(last_updated)
    Severity: Minor
    Found in lib/expressly/domain.rb by rubocop

    This cop checks for duplicated instance (or singleton) method definitions.

    Example:

    # bad
    
    def duplicated
      1
    end
    
    def duplicated
      2
    end

    Example:

    # bad
    
    def duplicated
      1
    end
    
    alias duplicated other_duplicated

    Example:

    # good
    
    def duplicated
      1
    end
    
    def other_duplicated
      2
    end

    Method Expressly::Customer#last_order_date= is defined at both lib/expressly/domain.rb:66 and lib/expressly/domain.rb:90.
    Open

        def last_order_date=(last_order_date)
    Severity: Minor
    Found in lib/expressly/domain.rb by rubocop

    This cop checks for duplicated instance (or singleton) method definitions.

    Example:

    # bad
    
    def duplicated
      1
    end
    
    def duplicated
      2
    end

    Example:

    # bad
    
    def duplicated
      1
    end
    
    alias duplicated other_duplicated

    Example:

    # good
    
    def duplicated
      1
    end
    
    def other_duplicated
      2
    end

    Put one space between the method name and the first argument.
    Open

        attr_accessor  :type, :identity
    Severity: Minor
    Found in lib/expressly/domain.rb by rubocop

    Checks that exactly one space is used between a method name and the first argument for method calls without parentheses.

    Alternatively, extra spaces can be added to align the argument with something on a preceding or following line, if the AllowForAlignment config parameter is true.

    Example:

    # bad
    something  x
    something   y, z
    something'hello'
    
    # good
    something x
    something y, z
    something 'hello'

    Method Expressly::OnlineIdentity#type= is defined at both lib/expressly/domain.rb:310 and lib/expressly/domain.rb:316.
    Open

        def type=(type)
    Severity: Minor
    Found in lib/expressly/domain.rb by rubocop

    This cop checks for duplicated instance (or singleton) method definitions.

    Example:

    # bad
    
    def duplicated
      1
    end
    
    def duplicated
      2
    end

    Example:

    # bad
    
    def duplicated
      1
    end
    
    alias duplicated other_duplicated

    Example:

    # good
    
    def duplicated
      1
    end
    
    def other_duplicated
      2
    end

    There are no issues that match your filters.

    Category
    Status