maxdemarzi/neography

View on GitHub

Showing 35 of 49 total issues

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

    def initialize(from, to, algorithm, all=false, types = nil, dir = "all" )
Severity: Minor
Found in lib/neography/path_traverser.rb - About 45 mins to fix

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

        def return_result(response, code, body, parsed, path, query_body)
    Severity: Minor
    Found in lib/neography/connection.rb - About 45 mins to fix

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

            def add_relationship_to_index(index, key, value, id, unique = false)
      Severity: Minor
      Found in lib/neography/rest/relationship_indexes.rb - About 35 mins to fix

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

            def handle_4xx_500_response(response, code, body, path, query_body)
        Severity: Minor
        Found in lib/neography/connection.rb - About 35 mins to fix

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

                def find_geometries_in_bbox(layer, minx, maxx, miny, maxy)
          Severity: Minor
          Found in lib/neography/rest/spatial.rb - About 35 mins to fix

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

                def self.create_unique(index, key, value, props = nil, db = Neography::Rest.new)
            Severity: Minor
            Found in lib/neography/node.rb - About 35 mins to fix

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

                    def batch_find_geometries_in_bbox(layer, minx, maxx, miny, maxy)
              Severity: Minor
              Found in lib/neography/rest/batch.rb - About 35 mins to fix

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

                      def get_path(from, to, relationships, depth = 1, algorithm = "shortestPath")
                Severity: Minor
                Found in lib/neography/rest/node_paths.rb - About 35 mins to fix

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

                        def remove_from_index_path(klass, index, key_or_id, value_or_id = nil, id = nil)
                  Severity: Minor
                  Found in lib/neography/rest/batch.rb - About 35 mins to fix

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

                          def add_node_to_index(index, key, value, id, unique = false)
                    Severity: Minor
                    Found in lib/neography/rest/node_indexes.rb - About 35 mins to fix

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

                            def get_paths(from, to, relationships, depth = 1, algorithm = "allPaths")
                      Severity: Minor
                      Found in lib/neography/rest/node_paths.rb - About 35 mins to fix

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

                            def initialize(message = nil, code = nil, stacktrace = nil, request = nil, index = 0)
                        Severity: Minor
                        Found in lib/neography/errors.rb - About 35 mins to fix

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

                                def batch_add_node_to_index(index, key, value, id, unique = false)
                          Severity: Minor
                          Found in lib/neography/rest/batch.rb - About 35 mins to fix

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

                                  def path_options(to, relationships, depth, algorithm, extra_body = {})
                            Severity: Minor
                            Found in lib/neography/rest/node_paths.rb - About 35 mins to fix

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

                                  def self.json(body)
                                    begin
                                      MultiJson.load(body)
                                    rescue MultiJson::DecodeError, ArgumentError
                                      case
                              Severity: Minor
                              Found in lib/neography/multi_json_parser.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

                              Severity
                              Category
                              Status
                              Source
                              Language