SpeciesFileGroup/taxonworks

View on GitHub
app/models/geographic_item.rb

Summary

Maintainability
F
4 days
Test Coverage

Possible SQL injection
Open

      order("ST_Area(#{GeographicItem::GEOMETRY_SQL.to_sql}) #{direction}")
Severity: Minor
Found in app/models/geographic_item.rb by brakeman

Injection is #1 on the 2013 OWASP Top Ten web security risks. SQL injection is when a user is able to manipulate a value which is used unsafely inside a SQL query. This can lead to data leaks, data loss, elevation of privilege, and other unpleasant outcomes.

Brakeman focuses on ActiveRecord methods dealing with building SQL statements.

A basic (Rails 2.x) example looks like this:

User.first(:conditions => "username = '#{params[:username]}'")

Brakeman would produce a warning like this:

Possible SQL injection near line 30: User.first(:conditions => ("username = '#{params[:username]}'"))

The safe way to do this query is to use a parameterized query:

User.first(:conditions => ["username = ?", params[:username]])

Brakeman also understands the new Rails 3.x way of doing things (and local variables and concatenation):

username = params[:user][:name].downcase
password = params[:user][:password]

User.first.where("username = '" + username + "' AND password = '" + password + "'")

This results in this kind of warning:

Possible SQL injection near line 37:
User.first.where((((("username = '" + params[:user][:name].downcase) + "' AND password = '") + params[:user][:password]) + "'"))

See the Ruby Security Guide for more information and Rails-SQLi.org for many examples of SQL injection in Rails.

Possible SQL injection
Open

          where(q) # .excluding(geographic_items)
Severity: Minor
Found in app/models/geographic_item.rb by brakeman

Injection is #1 on the 2013 OWASP Top Ten web security risks. SQL injection is when a user is able to manipulate a value which is used unsafely inside a SQL query. This can lead to data leaks, data loss, elevation of privilege, and other unpleasant outcomes.

Brakeman focuses on ActiveRecord methods dealing with building SQL statements.

A basic (Rails 2.x) example looks like this:

User.first(:conditions => "username = '#{params[:username]}'")

Brakeman would produce a warning like this:

Possible SQL injection near line 30: User.first(:conditions => ("username = '#{params[:username]}'"))

The safe way to do this query is to use a parameterized query:

User.first(:conditions => ["username = ?", params[:username]])

Brakeman also understands the new Rails 3.x way of doing things (and local variables and concatenation):

username = params[:user][:name].downcase
password = params[:user][:password]

User.first.where("username = '" + username + "' AND password = '" + password + "'")

This results in this kind of warning:

Possible SQL injection near line 37:
User.first.where((((("username = '" + params[:user][:name].downcase) + "' AND password = '") + params[:user][:password]) + "'"))

See the Ruby Security Guide for more information and Rails-SQLi.org for many examples of SQL injection in Rails.

Possible SQL injection
Open

      GeographicItem.find_by_sql(q1).first.r
Severity: Critical
Found in app/models/geographic_item.rb by brakeman

Injection is #1 on the 2013 OWASP Top Ten web security risks. SQL injection is when a user is able to manipulate a value which is used unsafely inside a SQL query. This can lead to data leaks, data loss, elevation of privilege, and other unpleasant outcomes.

Brakeman focuses on ActiveRecord methods dealing with building SQL statements.

A basic (Rails 2.x) example looks like this:

User.first(:conditions => "username = '#{params[:username]}'")

Brakeman would produce a warning like this:

Possible SQL injection near line 30: User.first(:conditions => ("username = '#{params[:username]}'"))

The safe way to do this query is to use a parameterized query:

User.first(:conditions => ["username = ?", params[:username]])

Brakeman also understands the new Rails 3.x way of doing things (and local variables and concatenation):

username = params[:user][:name].downcase
password = params[:user][:password]

User.first.where("username = '" + username + "' AND password = '" + password + "'")

This results in this kind of warning:

Possible SQL injection near line 37:
User.first.where((((("username = '" + params[:user][:name].downcase) + "' AND password = '") + params[:user][:password]) + "'"))

See the Ruby Security Guide for more information and Rails-SQLi.org for many examples of SQL injection in Rails.

Possible SQL injection
Open

      where("#{column_name} is not null and ST_Distance(#{column_name}, " \
Severity: Minor
Found in app/models/geographic_item.rb by brakeman

Injection is #1 on the 2013 OWASP Top Ten web security risks. SQL injection is when a user is able to manipulate a value which is used unsafely inside a SQL query. This can lead to data leaks, data loss, elevation of privilege, and other unpleasant outcomes.

Brakeman focuses on ActiveRecord methods dealing with building SQL statements.

A basic (Rails 2.x) example looks like this:

User.first(:conditions => "username = '#{params[:username]}'")

Brakeman would produce a warning like this:

Possible SQL injection near line 30: User.first(:conditions => ("username = '#{params[:username]}'"))

The safe way to do this query is to use a parameterized query:

User.first(:conditions => ["username = ?", params[:username]])

Brakeman also understands the new Rails 3.x way of doing things (and local variables and concatenation):

username = params[:user][:name].downcase
password = params[:user][:password]

User.first.where("username = '" + username + "' AND password = '" + password + "'")

This results in this kind of warning:

Possible SQL injection near line 37:
User.first.where((((("username = '" + params[:user][:name].downcase) + "' AND password = '") + params[:user][:password]) + "'"))

See the Ruby Security Guide for more information and Rails-SQLi.org for many examples of SQL injection in Rails.

Possible SQL injection
Open

    JSON.parse(GeographicItem.connection.select_all("SELECT ST_AsGeoJSON(#{geo_object_type}::geometry) a " \
Severity: Minor
Found in app/models/geographic_item.rb by brakeman

Injection is #1 on the 2013 OWASP Top Ten web security risks. SQL injection is when a user is able to manipulate a value which is used unsafely inside a SQL query. This can lead to data leaks, data loss, elevation of privilege, and other unpleasant outcomes.

Brakeman focuses on ActiveRecord methods dealing with building SQL statements.

A basic (Rails 2.x) example looks like this:

User.first(:conditions => "username = '#{params[:username]}'")

Brakeman would produce a warning like this:

Possible SQL injection near line 30: User.first(:conditions => ("username = '#{params[:username]}'"))

The safe way to do this query is to use a parameterized query:

User.first(:conditions => ["username = ?", params[:username]])

Brakeman also understands the new Rails 3.x way of doing things (and local variables and concatenation):

username = params[:user][:name].downcase
password = params[:user][:password]

User.first.where("username = '" + username + "' AND password = '" + password + "'")

This results in this kind of warning:

Possible SQL injection near line 37:
User.first.where((((("username = '" + params[:user][:name].downcase) + "' AND password = '") + params[:user][:password]) + "'"))

See the Ruby Security Guide for more information and Rails-SQLi.org for many examples of SQL injection in Rails.

File geographic_item.rb has 766 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require 'rgeo'

# A GeographicItem is one and only one of [point, line_string, polygon, multi_point, multi_line_string,
# multi_polygon, geometry_collection] which describes a position, path, or area on the globe, generally associated
# with a geographic_area (through a geographic_area_geographic_item entry), and sometimes only with a georeference.
Severity: Major
Found in app/models/geographic_item.rb - About 1 day to fix

    Class GeographicItem has 90 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class GeographicItem < ApplicationRecord
      include Housekeeping::Users
      include Housekeeping::Timestamps
      include Shared::IsData
      include Shared::SharedAcrossProjects
    Severity: Major
    Found in app/models/geographic_item.rb - About 1 day to fix

      Method has too many lines. [26/25]
      Open

          def gather_geographic_area_or_shape_data(geographic_area_ids, shape_in, search_object_class, project_id)
            if shape_in.blank?
              # get the shape from the geographic area, if possible
              finding = search_object_class.constantize
              target_geographic_item_ids = []
      Severity: Minor
      Found in app/models/geographic_item.rb by rubocop

      This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

      Method gather_geographic_area_or_shape_data has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          def gather_geographic_area_or_shape_data(geographic_area_ids, shape_in, search_object_class, project_id)
            if shape_in.blank?
              # get the shape from the geographic area, if possible
              finding = search_object_class.constantize
              target_geographic_item_ids = []
      Severity: Minor
      Found in app/models/geographic_item.rb - About 1 hr 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

      Method are_contained_in_item_by_id has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def are_contained_in_item_by_id(column_name, *geographic_item_ids) # = containing
            geographic_item_ids.flatten! # in case there is a array of arrays, or multiple objects
            column_name.downcase!
            case column_name
              when 'any'
      Severity: Minor
      Found in app/models/geographic_item.rb - About 1 hr to fix

        Method are_contained_in_item_by_id has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

            def are_contained_in_item_by_id(column_name, *geographic_item_ids) # = containing
              geographic_item_ids.flatten! # in case there is a array of arrays, or multiple objects
              column_name.downcase!
              case column_name
                when 'any'
        Severity: Minor
        Found in app/models/geographic_item.rb - About 1 hr 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

        Method is_contained_by_sql has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

            def is_contained_by_sql(column_name, geographic_item)
              geo_id = geographic_item.id
              geo_type = geographic_item.geo_object_type
              template = '(ST_Contains((select geographic_items.%s::geometry from geographic_items where ' \
                              'geographic_items.id = %d), %s::geometry))'
        Severity: Minor
        Found in app/models/geographic_item.rb - About 1 hr 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

        Method is_contained_by has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def is_contained_by(column_name, *geographic_items)
              column_name.downcase!
              case column_name
                when 'any'
                  part = []
        Severity: Minor
        Found in app/models/geographic_item.rb - About 1 hr to fix

          Method is_contained_by_sql has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def is_contained_by_sql(column_name, geographic_item)
                geo_id = geographic_item.id
                geo_type = geographic_item.geo_object_type
                template = '(ST_Contains((select geographic_items.%s::geometry from geographic_items where ' \
                                'geographic_items.id = %d), %s::geometry))'
          Severity: Minor
          Found in app/models/geographic_item.rb - About 1 hr to fix

            Method gather_geographic_area_or_shape_data has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                def gather_geographic_area_or_shape_data(geographic_area_ids, shape_in, search_object_class, project_id)
                  if shape_in.blank?
                    # get the shape from the geographic area, if possible
                    finding = search_object_class.constantize
                    target_geographic_item_ids = []
            Severity: Minor
            Found in app/models/geographic_item.rb - About 1 hr to fix

              Method is_contained_by has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  def is_contained_by(column_name, *geographic_items)
                    column_name.downcase!
                    case column_name
                      when 'any'
                        part = []
              Severity: Minor
              Found in app/models/geographic_item.rb - About 55 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

              Method are_contained_in_wkt has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  def are_contained_in_wkt(column_name, geometry)
                    column_name.downcase!
                    # column_name = 'point'
                    case column_name
                      when 'any'
              Severity: Minor
              Found in app/models/geographic_item.rb - About 45 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

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

                  def gather_map_data(feature, search_object_class, project_id)
                    finding = search_object_class.constantize
                    g_feature = RGeo::GeoJSON.decode(feature, json_parser: :json)
                    if g_feature.nil?
                      finding.none
              Severity: Minor
              Found in app/models/geographic_item.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

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

                def shape=(value)
                  unless value.blank?
                    geom = RGeo::GeoJSON.decode(value, json_parser: :json)
                    this_type = JSON.parse(value)['geometry']['type']
              
              
              Severity: Minor
              Found in app/models/geographic_item.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

              TODO found
              Open

                  # TODO: Remove the hard coded 4326 reference
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                  # TODO: handle other parts of the polygon; i.e., the interior_rings (if they exist)
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                # @TODO doesn't work?
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                    f = "'D.DDDDDD'" # TODO: probably a constant somewhere
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                # !!TODO: migrate these to use native column calls this to "native"
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                            # TODO: Figure out how to see through this group of geographic_items to the ones which contain
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                  # TODO: * rename to reflect either/or and what is being returned
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                  # TODO: should this be wkt_point instead of rgeo_point?
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                      # @TODO change 'id in (?)' to some other sql construct
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                  # TODO: test this
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                        # TODO: There probably is a better way to do this, but for now...
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                  # TODO: Remove the hard coded 4326 reference
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                        # TODO: change 'id in (?)' to some other sql construct
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                  # TODO: should be containing_wkt ?
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                        # @TODO change 'id in (?)' to some other sql construct
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                        # TODO: change 'id in (?)' to some other sql construct
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                        # TODO: change 'id in (?)' to some other sql construct
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                        # TODO: change 'id in (?)' to some other sql construct
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                        # @TODO change 'id in (?)' to some other sql construct
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              TODO found
              Open

                    # TODO: @tuckerjd isn't this set automatically? Or perhaps the callback isn't hit in this approach?
              Severity: Minor
              Found in app/models/geographic_item.rb by fixme

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                      when 'any'
                        part = []
                        DATA_TYPES.each { |column|
                          unless column == :geometry_collection
                            part.push(GeographicItem.is_contained_by(column.to_s, geographic_items).to_a)
              Severity: Minor
              Found in app/models/geographic_item.rb and 1 other location - About 25 mins to fix
              app/models/geographic_item.rb on lines 674..682

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 30.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                      when 'any'
                        part = []
                        DATA_TYPES.each { |column|
                          unless column == :geometry_collection
                            part.push(GeographicItem.are_contained_in_item_by_id(column.to_s, geographic_item_ids).to_a)
              Severity: Minor
              Found in app/models/geographic_item.rb and 1 other location - About 25 mins to fix
              app/models/geographic_item.rb on lines 752..760

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 30.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Prefer single-quoted strings when you don't need string interpolation or special symbols.
              Open

                                   .when('GeographicItem::MultiPoint').then(Arel::Nodes::NamedFunction.new("CAST", [arel_table[:multi_point].as('geometry')]))
              Severity: Minor
              Found in app/models/geographic_item.rb by rubocop

              Checks if uses of quotes match the configured preference.

              Example: EnforcedStyle: single_quotes (default)

              # bad
              "No special symbols"
              "No string interpolation"
              "Just text"
              
              # good
              'No special symbols'
              'No string interpolation'
              'Just text'
              "Wait! What's #{this}!"

              Example: EnforcedStyle: double_quotes

              # bad
              'Just some text'
              'No special chars or interpolation'
              
              # good
              "Just some text"
              "No special chars or interpolation"
              "Every string in #{project} uses double_quotes"

              Prefer single-quoted strings when you don't need string interpolation or special symbols.
              Open

                                   .when('GeographicItem::GeometryCollection').then(Arel::Nodes::NamedFunction.new("CAST", [arel_table[:geometry_collection].as('geometry')]))
              Severity: Minor
              Found in app/models/geographic_item.rb by rubocop

              Checks if uses of quotes match the configured preference.

              Example: EnforcedStyle: single_quotes (default)

              # bad
              "No special symbols"
              "No string interpolation"
              "Just text"
              
              # good
              'No special symbols'
              'No string interpolation'
              'Just text'
              "Wait! What's #{this}!"

              Example: EnforcedStyle: double_quotes

              # bad
              'Just some text'
              'No special chars or interpolation'
              
              # good
              "Just some text"
              "No special chars or interpolation"
              "Every string in #{project} uses double_quotes"

              Prefer single-quoted strings when you don't need string interpolation or special symbols.
              Open

                                   .when('GeographicItem::Polygon').then(Arel::Nodes::NamedFunction.new("CAST", [arel_table[:polygon].as('geometry')]))
              Severity: Minor
              Found in app/models/geographic_item.rb by rubocop

              Checks if uses of quotes match the configured preference.

              Example: EnforcedStyle: single_quotes (default)

              # bad
              "No special symbols"
              "No string interpolation"
              "Just text"
              
              # good
              'No special symbols'
              'No string interpolation'
              'Just text'
              "Wait! What's #{this}!"

              Example: EnforcedStyle: double_quotes

              # bad
              'Just some text'
              'No special chars or interpolation'
              
              # good
              "Just some text"
              "No special chars or interpolation"
              "Every string in #{project} uses double_quotes"

              Prefer single-quoted strings when you don't need string interpolation or special symbols.
              Open

                                   .when('GeographicItem::MultiPolygon').then(Arel::Nodes::NamedFunction.new("CAST", [arel_table[:multi_polygon].as('geometry')]))
              Severity: Minor
              Found in app/models/geographic_item.rb by rubocop

              Checks if uses of quotes match the configured preference.

              Example: EnforcedStyle: single_quotes (default)

              # bad
              "No special symbols"
              "No string interpolation"
              "Just text"
              
              # good
              'No special symbols'
              'No string interpolation'
              'Just text'
              "Wait! What's #{this}!"

              Example: EnforcedStyle: double_quotes

              # bad
              'Just some text'
              'No special chars or interpolation'
              
              # good
              "Just some text"
              "No special chars or interpolation"
              "Every string in #{project} uses double_quotes"

              Prefer single-quoted strings when you don't need string interpolation or special symbols.
              Open

                                   .when('GeographicItem::Point').then(Arel::Nodes::NamedFunction.new("CAST", [arel_table[:point].as('geometry')]))
              Severity: Minor
              Found in app/models/geographic_item.rb by rubocop

              Checks if uses of quotes match the configured preference.

              Example: EnforcedStyle: single_quotes (default)

              # bad
              "No special symbols"
              "No string interpolation"
              "Just text"
              
              # good
              'No special symbols'
              'No string interpolation'
              'Just text'
              "Wait! What's #{this}!"

              Example: EnforcedStyle: double_quotes

              # bad
              'Just some text'
              'No special chars or interpolation'
              
              # good
              "Just some text"
              "No special chars or interpolation"
              "Every string in #{project} uses double_quotes"

              Prefer single-quoted strings when you don't need string interpolation or special symbols.
              Open

                                   .when('GeographicItem::LineString').then(Arel::Nodes::NamedFunction.new("CAST", [arel_table[:line_string].as('geometry')]))
              Severity: Minor
              Found in app/models/geographic_item.rb by rubocop

              Checks if uses of quotes match the configured preference.

              Example: EnforcedStyle: single_quotes (default)

              # bad
              "No special symbols"
              "No string interpolation"
              "Just text"
              
              # good
              'No special symbols'
              'No string interpolation'
              'Just text'
              "Wait! What's #{this}!"

              Example: EnforcedStyle: double_quotes

              # bad
              'Just some text'
              'No special chars or interpolation'
              
              # good
              "Just some text"
              "No special chars or interpolation"
              "Every string in #{project} uses double_quotes"

              Prefer single-quoted strings when you don't need string interpolation or special symbols.
              Open

                                   .when('GeographicItem::MultiLineString').then(Arel::Nodes::NamedFunction.new("CAST", [arel_table[:multi_line_string].as('geometry')]))
              Severity: Minor
              Found in app/models/geographic_item.rb by rubocop

              Checks if uses of quotes match the configured preference.

              Example: EnforcedStyle: single_quotes (default)

              # bad
              "No special symbols"
              "No string interpolation"
              "Just text"
              
              # good
              'No special symbols'
              'No string interpolation'
              'Just text'
              "Wait! What's #{this}!"

              Example: EnforcedStyle: double_quotes

              # bad
              'Just some text'
              'No special chars or interpolation'
              
              # good
              "Just some text"
              "No special chars or interpolation"
              "Every string in #{project} uses double_quotes"

              There are no issues that match your filters.

              Category
              Status