unepwcmc/SAPI

View on GitHub
lib/tasks/elibrary/identification_docs_distributions_importer.rb

Summary

Maintainability
A
2 hrs
Test Coverage

Method import_higher_taxa_distributions has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def self.import_higher_taxa_distributions

    sql = <<-SQL
    WITH doc_taxon_tmp AS (
      SELECT DISTINCT(dc.id) doc_cit_id, UNNEST(d.taxon_concept_ids)tc_ids
Severity: Minor
Found in lib/tasks/elibrary/identification_docs_distributions_importer.rb - About 1 hr to fix

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

      def self.import_species_distributions
        sql = <<-SQL
          WITH doc_taxon_tmp AS (
              SELECT dc.id doc_cit_id, dctc.taxon_concept_id tc_id
              FROM document_citation_taxon_concepts dctc
    Severity: Minor
    Found in lib/tasks/elibrary/identification_docs_distributions_importer.rb - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status