unepwcmc/SAPI

View on GitHub
app/models/trade/taxon_concept_source_validation_rule.rb

Summary

Maintainability
A
2 hrs
Test Coverage

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

  def matching_records_arel(table_name)
    s = Arel::Table.new("#{table_name}_view")
    tc = Arel::Table.new('taxon_concepts')
    t = Arel::Table.new('taxonomies')

Severity: Minor
Found in app/models/trade/taxon_concept_source_validation_rule.rb - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

        return nil unless shipment.source && (
          shipment.taxon_concept &&
          shipment.taxon_concept.data['kingdom_name'] == 'Animalia' &&
          INVALID_KINGDOM_SOURCE['ANIMALIA'].include?(shipment.source.code) ||
          shipment.taxon_concept &&
    Severity: Major
    Found in app/models/trade/taxon_concept_source_validation_rule.rb - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status