unageanu/jiji2

View on GitHub
src/jiji/model/securities/internal/virtual/ordering.rb

Summary

Maintainability
A
1 hr
Test Coverage

Assignment Branch Condition size for modify_order is too high. [17.97/15]
Open

    def modify_order(internal_id, options = {})
      options = Converter.convert_option_to_oanda(options)
      order = find_order_by_internal_id(internal_id)
      validate_modify_order_request(order, options)
      MODIFIABLE_PROPERTIES.each do |key|

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

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

    def order(pair_name, sell_or_buy, units, type = :market, options = {})
Severity: Minor
Found in src/jiji/model/securities/internal/virtual/ordering.rb - About 35 mins to fix

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

        def create_order(pair_name, sell_or_buy, units, type, options)
    Severity: Minor
    Found in src/jiji/model/securities/internal/virtual/ordering.rb - About 35 mins to fix

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

          def resolve_price(type, pair_name, sell_or_buy, options, tick)
      Severity: Minor
      Found in src/jiji/model/securities/internal/virtual/ordering.rb - About 35 mins to fix

        Line is too long. [94/80]
        Open

                new_value = (order.method(snaked).call || {}).merge(new_value) if new_value.is_a? Hash

        Line is too long. [111/80]
        Open

                order.method("#{snaked}=").call(Converter.convert_option_value_from_oanda(key, new_value)) if new_value

        Line is too long. [90/80]
        Open

              options = order.collect_properties_for_modify.merge(options).with_indifferent_access

        There are no issues that match your filters.

        Category
        Status