Foxandxss/angular-toastr

View on GitHub

Showing 8 of 8 total issues

Function toastr has 227 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function toastr($animate, $injector, $rootScope, $sce, toastrConfig, $q) {
    var container;
    var index = 0;
    var toasts = [];

Severity: Major
Found in src/toastr.js - About 1 day to fix

    Function _notify has 109 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function _notify(map) {
          var options = _getOptions();
    
          if (shouldExit()) { return; }
    
    
    Severity: Major
    Found in src/toastr.js - About 4 hrs to fix

      Function toast has 77 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function toast($injector, $interval, toastrConfig, toastr) {
          return {
            templateUrl: function() {
              return toastrConfig.templates.toast;
            },
      Severity: Major
      Found in src/directives/toast/toast.directive.js - About 3 hrs to fix

        Function toastLinkFunction has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function toastLinkFunction(scope, element, attrs, toastCtrl) {
              var timeout;
        
              scope.toastClass = scope.options.toastClass;
              scope.titleClass = scope.options.titleClass;
        Severity: Major
        Found in src/directives/toast/toast.directive.js - About 2 hrs to fix

          Function createScope has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                function createScope(toast, map, options) {
                  if (options.allowHtml) {
                    toast.scope.allowHtml = true;
                    toast.scope.title = $sce.trustAsHtml(map.title);
                    toast.scope.message = $sce.trustAsHtml(map.message);
          Severity: Minor
          Found in src/toastr.js - About 1 hr to fix

            Function remove has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function remove(toastId, wasClicked) {
                  var toast = findToast(toastId);
            
                  if (toast && ! toast.deleting) { // Avoid clicking when fading out
                    toast.deleting = true;
            Severity: Minor
            Found in src/toastr.js - About 1 hr to fix

              Function progressBar has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function progressBar(toastrConfig) {
                  return {
                    require: '^toast',
                    templateUrl: function() {
                      return toastrConfig.templates.progressbar;
              Severity: Minor
              Found in src/directives/progressbar/progressbar.directive.js - About 1 hr to fix

                Function toastr has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  function toastr($animate, $injector, $rootScope, $sce, toastrConfig, $q) {
                Severity: Minor
                Found in src/toastr.js - About 45 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language