expertiza/expertiza

View on GitHub
app/models/node.rb

Summary

Maintainability
A
1 hr
Test Coverage
B
87%

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

  def get_children(sortvar = nil, sortorder = nil, user_id = nil, show = nil, parent_id = nil, search = nil); end
Severity: Minor
Found in app/models/node.rb - About 45 mins to fix

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

      def self.get(_sortvar = nil, _sortorder = nil, _user_id = nil, _show = nil, _parent_id = nil, _search = nil); end
    Severity: Minor
    Found in app/models/node.rb - About 45 mins to fix

      Avoid parameter lists longer than 5 parameters. [6/5]
      Open

        def get_children(sortvar = nil, sortorder = nil, user_id = nil, show = nil, parent_id = nil, search = nil); end
      Severity: Minor
      Found in app/models/node.rb by rubocop

      This cop checks for methods with too many parameters. The maximum number of parameters is configurable. Keyword arguments can optionally be excluded from the total count.

      Avoid parameter lists longer than 5 parameters. [6/5]
      Open

        def self.get(_sortvar = nil, _sortorder = nil, _user_id = nil, _show = nil, _parent_id = nil, _search = nil); end
      Severity: Minor
      Found in app/models/node.rb by rubocop

      This cop checks for methods with too many parameters. The maximum number of parameters is configurable. Keyword arguments can optionally be excluded from the total count.

      Do not prefix reader method names with get_.
      Open

        def get_child_type; end
      Severity: Minor
      Found in app/models/node.rb by rubocop

      This cop makes sure that accessor methods are named properly.

      Example:

      # bad
      def set_attribute(value)
      end
      
      # good
      def attribute=(value)
      end
      
      # bad
      def get_attribute
      end
      
      # good
      def attribute
      end

      Rename is_leaf to leaf?.
      Open

        def is_leaf
      Severity: Minor
      Found in app/models/node.rb by rubocop

      This cop makes sure that predicates are named properly.

      Example:

      # bad
      def is_even?(value)
      end
      
      # good
      def even?(value)
      end
      
      # bad
      def has_value?
      end
      
      # good
      def value?
      end

      Do not prefix reader method names with get_.
      Open

        def get_name; end
      Severity: Minor
      Found in app/models/node.rb by rubocop

      This cop makes sure that accessor methods are named properly.

      Example:

      # bad
      def set_attribute(value)
      end
      
      # good
      def attribute=(value)
      end
      
      # bad
      def get_attribute
      end
      
      # good
      def attribute
      end

      Do not prefix reader method names with get_.
      Open

        def get_creation_date; end
      Severity: Minor
      Found in app/models/node.rb by rubocop

      This cop makes sure that accessor methods are named properly.

      Example:

      # bad
      def set_attribute(value)
      end
      
      # good
      def attribute=(value)
      end
      
      # bad
      def get_attribute
      end
      
      # good
      def attribute
      end

      Do not prefix reader method names with get_.
      Open

        def get_partial_name
      Severity: Minor
      Found in app/models/node.rb by rubocop

      This cop makes sure that accessor methods are named properly.

      Example:

      # bad
      def set_attribute(value)
      end
      
      # good
      def attribute=(value)
      end
      
      # bad
      def get_attribute
      end
      
      # good
      def attribute
      end

      Do not prefix reader method names with get_.
      Open

        def get_modified_date; end
      Severity: Minor
      Found in app/models/node.rb by rubocop

      This cop makes sure that accessor methods are named properly.

      Example:

      # bad
      def set_attribute(value)
      end
      
      # good
      def attribute=(value)
      end
      
      # bad
      def get_attribute
      end
      
      # good
      def attribute
      end

      Do not prefix reader method names with get_.
      Open

        def get_directory; end
      Severity: Minor
      Found in app/models/node.rb by rubocop

      This cop makes sure that accessor methods are named properly.

      Example:

      # bad
      def set_attribute(value)
      end
      
      # good
      def attribute=(value)
      end
      
      # bad
      def get_attribute
      end
      
      # good
      def attribute
      end

      There are no issues that match your filters.

      Category
      Status