540co/epa-rfi

View on GitHub
src/app/services/reports.service.js

Summary

Maintainability
C
1 day
Test Coverage

Function ReportService has 146 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function ReportService(DataService, $q) {

    var reportService = {
      getYearlyAirPollutionReport: getYearlyAirPollutionReport,
      getStateList: getStateList
Severity: Major
Found in src/app/services/reports.service.js - About 5 hrs to fix

    Function calculateReportTotals has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function calculateReportTotals(reportData) {
          // Total years
          var numReportRows = reportData.length;
          if(numReportRows > 0) {
          // Add totals to reports
    Severity: Minor
    Found in src/app/services/reports.service.js - About 1 hr to fix

      Function buildQueryParams has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function buildQueryParams(params, unitOfMeasure) {
            var filters = [],
              queryParams = {},
              filterMappings = {
                'state': 'facility.address.state',
      Severity: Minor
      Found in src/app/services/reports.service.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status