eHealthAfrica/LMIS-Chrome

View on GitHub
app/scripts/controllers/survey.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function controller has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    controller: function ($stateParams, $state, $scope, surveyFactory, growl, appConfig, i18n, alertFactory) {

      if(!$stateParams.surveyUUID){
        growl.error(i18n('surveyNotFound'), {persistent: true});
        return;
Severity: Minor
Found in app/scripts/controllers/survey.js - About 1 hr to fix

    Function save has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          $scope.save = function () {
    
            $scope.isSaving = true;
    
            var surveyResponse = {
    Severity: Minor
    Found in app/scripts/controllers/survey.js - About 1 hr to fix

      Function controller has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          controller: function ($stateParams, $state, $scope, surveyFactory, growl, appConfig, i18n, alertFactory) {
      Severity: Major
      Found in app/scripts/controllers/survey.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status