hipay/hipay-wallet-cashout-mirakl-integration

View on GitHub
web/js/bootstrap-multiselect.js

Summary

Maintainability
F
2 wks
Test Coverage

File bootstrap-multiselect.js has 1156 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Bootstrap Multiselect (http://davidstutz.de/bootstrap-multiselect/)
 *
 * Apache License, Version 2.0:
 * Copyright (c) 2012 - 2017 David Stutz
Severity: Major
Found in web/js/bootstrap-multiselect.js - About 2 days to fix

    Function buildDropdownOptions has 220 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            buildDropdownOptions: function() {
    
                this.$select.children().each($.proxy(function(index, element) {
    
                    var $element = $(element);
    Severity: Major
    Found in web/js/bootstrap-multiselect.js - About 1 day to fix

      Function buildFilter has 93 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              buildFilter: function() {
      
                  // Build filter if filtering OR case insensitive filtering is enabled and the number of options exceeds (or equals) enableFilterLength.
                  if (this.options.enableFiltering || this.options.enableCaseInsensitiveFiltering) {
                      var enableFilterLength = Math.max(this.options.enableFiltering, this.options.enableCaseInsensitiveFiltering);
      Severity: Major
      Found in web/js/bootstrap-multiselect.js - About 3 hrs to fix

        Function init has 85 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
                        var $element = $(element);
                        var config = ko.toJS(valueAccessor());
        
                        $element.multiselect(config);
        Severity: Major
        Found in web/js/bootstrap-multiselect.js - About 3 hrs to fix

          Function searchTimeout has 61 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                                  this.searchTimeout = this.asyncFunction($.proxy(function() {
          
                                      if (this.query !== event.target.value) {
                                          this.query = event.target.value;
          
          
          Severity: Major
          Found in web/js/bootstrap-multiselect.js - About 2 hrs to fix

            Function createOptionValue has 51 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    createOptionValue: function(element) {
                        var $element = $(element);
                        if ($element.is(':selected')) {
                            $element.prop('selected', true);
                        }
            Severity: Major
            Found in web/js/bootstrap-multiselect.js - About 2 hrs to fix

              Function dataprovider has 43 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      dataprovider: function(dataprovider) {
              
                          var groupCounter = 0;
                          var $select = this.$select.empty();
              
              
              Severity: Minor
              Found in web/js/bootstrap-multiselect.js - About 1 hr to fix

                Function refresh has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        refresh: function () {
                            var inputs = {};
                            $('li input', this.$ul).each(function() {
                              inputs[$(this).val()] = $(this);
                            });
                Severity: Minor
                Found in web/js/bootstrap-multiselect.js - About 1 hr to fix

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

                      function Multiselect(select, options) {
                  
                          this.$select = $(select);
                          this.options = this.mergeOptions($.extend({}, options, this.$select.data()));
                  
                  
                  Severity: Minor
                  Found in web/js/bootstrap-multiselect.js - About 1 hr to fix

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

                            buildSelectAll: function() {
                                if (typeof this.options.selectAllValue === 'number') {
                                    this.options.selectAllValue = this.options.selectAllValue.toString();
                                }
                    
                    
                    Severity: Minor
                    Found in web/js/bootstrap-multiselect.js - About 1 hr to fix

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

                              select: function(selectValues, triggerOnChange) {
                                  if(!$.isArray(selectValues)) {
                                      selectValues = [selectValues];
                                  }
                      
                      
                      Severity: Minor
                      Found in web/js/bootstrap-multiselect.js - About 1 hr to fix

                        Function buttonText has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    buttonText: function(options, select) {
                                        if (this.disabledText.length > 0
                                                && (select.prop('disabled') || (options.length == 0 && this.disableIfEmpty)))  {
                        
                                            return this.disabledText;
                        Severity: Minor
                        Found in web/js/bootstrap-multiselect.js - About 1 hr to fix

                          Function deselect has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  deselect: function(deselectValues, triggerOnChange) {
                                      if(!$.isArray(deselectValues)) {
                                          deselectValues = [deselectValues];
                                      }
                          
                          
                          Severity: Minor
                          Found in web/js/bootstrap-multiselect.js - About 1 hr to fix

                            Function deselectAll has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    deselectAll: function (justVisible, triggerOnDeselectAll) {
                            
                                        var justVisible = typeof justVisible === 'undefined' ? true : justVisible;
                                        var allLis = $("li:not(.divider):not(.disabled):not(.multiselect-group)", this.$ul);
                                        var visibleLis = $("li:not(.divider):not(.disabled):not(.multiselect-group):not(.multiselect-filter-hidden):not(.multiselect-collapisble-hidden)", this.$ul).filter(':visible');
                            Severity: Minor
                            Found in web/js/bootstrap-multiselect.js - About 1 hr to fix

                              Function selectAll has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      selectAll: function (justVisible, triggerOnSelectAll) {
                              
                                          var justVisible = typeof justVisible === 'undefined' ? true : justVisible;
                                          var allLis = $("li:not(.divider):not(.disabled):not(.multiselect-group)", this.$ul);
                                          var visibleLis = $("li:not(.divider):not(.disabled):not(.multiselect-group):not(.multiselect-filter-hidden):not(.multiselect-collapisble-hidden)", this.$ul).filter(':visible');
                              Severity: Minor
                              Found in web/js/bootstrap-multiselect.js - About 1 hr to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                        if (this.options.enableCaseInsensitiveFiltering) {
                                                                            filterCandidate = filterCandidate.toLowerCase();
                                                                            this.query = this.query.toLowerCase();
                                                                        }
                                Severity: Major
                                Found in web/js/bootstrap-multiselect.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                          if (this.options.enableFullValueFiltering && this.options.filterBehavior !== 'both') {
                                                                              var valueToMatch = filterCandidate.trim().substring(0, this.query.length);
                                                                              if (this.query.indexOf(valueToMatch) > -1) {
                                                                                  showElement = true;
                                                                              }
                                  Severity: Major
                                  Found in web/js/bootstrap-multiselect.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                            if(!showElement){
                                                                              $(element).css('display', 'none');
                                                                              $(element).addClass('multiselect-filter-hidden');
                                                                            }
                                    Severity: Major
                                    Found in web/js/bootstrap-multiselect.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                              if ($(element).hasClass('multiselect-group')) {
                                                                                  // Remember group status.
                                                                                  currentGroup = element;
                                                                                  currentGroupVisible = showElement;
                                                                              }
                                      Severity: Major
                                      Found in web/js/bootstrap-multiselect.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                                if(showElement){
                                                                                  $(element).css('display', 'block');
                                                                                  $(element).removeClass('multiselect-filter-hidden');
                                                                                }
                                        Severity: Major
                                        Found in web/js/bootstrap-multiselect.js - About 45 mins to fix

                                          Function init has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                          Open

                                                      init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
                                          Severity: Minor
                                          Found in web/js/bootstrap-multiselect.js - About 35 mins to fix

                                            Function update has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                                        update: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
                                            Severity: Minor
                                            Found in web/js/bootstrap-multiselect.js - About 35 mins to fix

                                              Avoid too many return statements within this function.
                                              Open

                                                                  return options.length + ' ' + this.nSelectedText;
                                              Severity: Major
                                              Found in web/js/bootstrap-multiselect.js - About 30 mins to fix

                                                Avoid too many return statements within this function.
                                                Open

                                                                    return selected.substr(0, selected.length - this.delimiterText.length);
                                                Severity: Major
                                                Found in web/js/bootstrap-multiselect.js - About 30 mins to fix

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                          deselectAll: function (justVisible, triggerOnDeselectAll) {
                                                  
                                                              var justVisible = typeof justVisible === 'undefined' ? true : justVisible;
                                                              var allLis = $("li:not(.divider):not(.disabled):not(.multiselect-group)", this.$ul);
                                                              var visibleLis = $("li:not(.divider):not(.disabled):not(.multiselect-group):not(.multiselect-filter-hidden):not(.multiselect-collapisble-hidden)", this.$ul).filter(':visible');
                                                  Severity: Major
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 2 days to fix
                                                  web/js/bootstrap-multiselect.js on lines 1382..1418

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 413.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                          selectAll: function (justVisible, triggerOnSelectAll) {
                                                  
                                                              var justVisible = typeof justVisible === 'undefined' ? true : justVisible;
                                                              var allLis = $("li:not(.divider):not(.disabled):not(.multiselect-group)", this.$ul);
                                                              var visibleLis = $("li:not(.divider):not(.disabled):not(.multiselect-group):not(.multiselect-filter-hidden):not(.multiselect-collapisble-hidden)", this.$ul).filter(':visible');
                                                  Severity: Major
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 2 days to fix
                                                  web/js/bootstrap-multiselect.js on lines 1427..1463

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 413.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                                  if (options.length === 0) {
                                                                      return this.nonSelectedText;
                                                                  }
                                                                  else {
                                                                      var selected = '';
                                                  Severity: Major
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 4 hrs to fix
                                                  web/js/bootstrap-multiselect.js on lines 272..285

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 129.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                                  else if (this.numberDisplayed != 0 && options.length > this.numberDisplayed) {
                                                                      return options.length + ' ' + this.nSelectedText;
                                                                  }
                                                                  else {
                                                                      var selected = '';
                                                  Severity: Major
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 4 hrs to fix
                                                  web/js/bootstrap-multiselect.js on lines 295..307

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 129.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                                  if (allBindings.has('selectedOptions')) {
                                                                      var selectedOptions = allBindings.get('selectedOptions');
                                                                      if (ko.isObservable(selectedOptions)) {
                                                                          ko.computed({
                                                                              read: function() {
                                                  Severity: Major
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 3 hrs to fix
                                                  web/js/bootstrap-multiselect.js on lines 89..102

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 110.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                                  if (allBindings.has('value')) {
                                                                      var value = allBindings.get('value');
                                                                      if (ko.isObservable(value)) {
                                                                          ko.computed({
                                                                              read: function() {
                                                  Severity: Major
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 3 hrs to fix
                                                  web/js/bootstrap-multiselect.js on lines 106..119

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 110.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                          getOptionByValue: function (value) {
                                                  
                                                              var options = $('option', this.$select);
                                                              var valueToCompare = value.toString();
                                                  
                                                  
                                                  Severity: Major
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 3 hrs to fix
                                                  web/js/bootstrap-multiselect.js on lines 1716..1727

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 109.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                          getInputByValue: function (value) {
                                                  
                                                              var checkboxes = $('li input:not(.multiselect-search)', this.$ul);
                                                              var valueToCompare = value.toString();
                                                  
                                                  
                                                  Severity: Major
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 3 hrs to fix
                                                  web/js/bootstrap-multiselect.js on lines 1697..1708

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 109.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                                          else {
                                                                              $(input).prop('checked', false);
                                                                              $(input).closest('li')
                                                                                  .removeClass(this.options.selectedClass);
                                                  
                                                  
                                                  Severity: Major
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 1 hr to fix
                                                  web/js/bootstrap-multiselect.js on lines 800..806

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 62.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                                          if (checked) {
                                                                              $(input).prop('checked', true);
                                                                              $(input).closest('li')
                                                                                  .addClass(this.options.selectedClass);
                                                  
                                                  
                                                  Severity: Major
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 1 hr to fix
                                                  web/js/bootstrap-multiselect.js on lines 807..813

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 62.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                                  if ($elem.is(':selected')) {
                                                                      $input.prop('checked', true);
                                                  
                                                                      if (this.options.selectedClass) {
                                                                          $input.closest('li')
                                                  Severity: Major
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 1 hr to fix
                                                  web/js/bootstrap-multiselect.js on lines 1229..1236

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 57.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                                  else {
                                                                      $input.prop('checked', false);
                                                  
                                                                      if (this.options.selectedClass) {
                                                                          $input.closest('li')
                                                  Severity: Major
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 1 hr to fix
                                                  web/js/bootstrap-multiselect.js on lines 1221..1228

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 57.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                          enable: function() {
                                                              this.$select.prop('disabled', false);
                                                              this.$button.prop('disabled', false)
                                                                  .removeClass('disabled');
                                                          },
                                                  Severity: Minor
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 50 mins to fix
                                                  web/js/bootstrap-multiselect.js on lines 1574..1578

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 52.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                          disable: function() {
                                                              this.$select.prop('disabled', true);
                                                              this.$button.prop('disabled', true)
                                                                  .addClass('disabled');
                                                          },
                                                  Severity: Minor
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 50 mins to fix
                                                  web/js/bootstrap-multiselect.js on lines 1565..1569

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 52.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                                  if (this.options.includeResetDivider) {
                                                                      this.$ul.prepend($(this.options.templates.divider));
                                                                  }
                                                  Severity: Minor
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 40 mins to fix
                                                  web/js/bootstrap-multiselect.js on lines 1025..1027

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 48.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  Similar blocks of code found in 2 locations. Consider refactoring.
                                                  Open

                                                                  if (this.options.includeSelectAllDivider) {
                                                                      this.$ul.prepend($(this.options.templates.divider));
                                                                  }
                                                  Severity: Minor
                                                  Found in web/js/bootstrap-multiselect.js and 1 other location - About 40 mins to fix
                                                  web/js/bootstrap-multiselect.js on lines 987..989

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 48.

                                                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                  Refactorings

                                                  Further Reading

                                                  There are no issues that match your filters.

                                                  Category
                                                  Status