maestrano/mno-enterprise

View on GitHub

Showing 153 of 305 total issues

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

    $scope.readonlyInput = angular.isDefined($attrs.readonlyInput) ? $scope.$parent.$eval($attrs.readonlyInput) : timepickerConfig.readonlyInput;
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 1652..1652
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 3143..3143
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 3144..3144
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 3255..3255
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 4780..4781

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 49.

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

    return $e.attr('data-content')
      || (typeof o.content == 'function' ?
            o.content.call($e[0]) :
            o.content)
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/tooltip.js on lines 389..390

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 49.

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

    this.stateOn = angular.isDefined($attrs.stateOn) ? $scope.$parent.$eval($attrs.stateOn) : ratingConfig.stateOn;
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 4079..4079

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 49.

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

    title = $e.attr('data-original-title')
      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/popover.js on lines 68..71

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 49.

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

    this.stateOff = angular.isDefined($attrs.stateOff) ? $scope.$parent.$eval($attrs.stateOff) : ratingConfig.stateOff;
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 4078..4078

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 49.

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 6 locations. Consider refactoring.
Open

      scope.showButtonBar = angular.isDefined(attrs.showButtonBar) ? scope.$parent.$eval(attrs.showButtonBar) : datepickerPopupConfig.showButtonBar;
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 3143..3143
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 3144..3144
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 3255..3255
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 4492..4492
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 4780..4781

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 49.

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 6 locations. Consider refactoring.
Open

      scope.align = angular.isDefined(attrs.align) ? scope.$parent.$eval(attrs.align) : pagerConfig.align;
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 1652..1652
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 3143..3143
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 3144..3144
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 4492..4492
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 4780..4781

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 49.

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 6 locations. Consider refactoring.
Open

      scope.boundaryLinks = angular.isDefined(attrs.boundaryLinks) ? scope.$parent.$eval(attrs.boundaryLinks) : paginationConfig.boundaryLinks;
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 1652..1652
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 3144..3144
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 3255..3255
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 4492..4492
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 4780..4781

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 49.

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 6 locations. Consider refactoring.
Open

      scope.directionLinks = angular.isDefined(attrs.directionLinks) ? scope.$parent.$eval(attrs.directionLinks) : paginationConfig.directionLinks;
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 1652..1652
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 3143..3143
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 3255..3255
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 4492..4492
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 4780..4781

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 49.

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 (!angular.isNumber(self.selectedOption)) {
          self.selectedOption = 0;
        } else {
          self.selectedOption = (self.selectedOption === elems.length -1 ?
            self.selectedOption :
frontend/app/assets/javascripts/mno_enterprise/lib/ui-bootstrap-tpls-0.13.4.js on lines 2240..2245

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 49.

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

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

      respond_to do |format|
        if @invoice
          filename = "Invoice - #{@invoice.slug}.pdf"
          pdf_view = MnoEnterprise::InvoicePdf.new(@invoice).render
          format.html { send_data pdf_view, filename: filename, type: "application/pdf", disposition: 'inline'  }
Severity: Minor
Found in api/app/controllers/mno_enterprise/admin/invoices_controller.rb and 1 other location - About 40 mins to fix
frontend/app/controllers/mno_enterprise/invoices_controller.rb on lines 11..17

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 38.

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

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

      respond_to do |format|
        if @invoice
          filename = "Invoice - #{@invoice.slug}.pdf"
          pdf_view = MnoEnterprise::InvoicePdf.new(@invoice).render
          format.html { send_data pdf_view, filename: filename, type: "application/pdf", disposition: 'inline'  }
Severity: Minor
Found in frontend/app/controllers/mno_enterprise/invoices_controller.rb and 1 other location - About 40 mins to fix
api/app/controllers/mno_enterprise/admin/invoices_controller.rb on lines 7..13

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 38.

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 9 locations. Consider refactoring.
Open

  $.fn.alert.noConflict = function () {
    $.fn.alert = old
    return this
  }
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/affix.js on lines 139..142
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/button.js on lines 96..99
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/carousel.js on lines 199..202
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/collapse.js on lines 190..193
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/dropdown.js on lines 144..147
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/modal.js on lines 298..301
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/scrollspy.js on lines 159..162
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/tab.js on lines 135..138

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 9 locations. Consider refactoring.
Open

  $.fn.modal.noConflict = function () {
    $.fn.modal = old
    return this
  }
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/affix.js on lines 139..142
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/alert.js on lines 83..86
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/button.js on lines 96..99
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/carousel.js on lines 199..202
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/collapse.js on lines 190..193
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/dropdown.js on lines 144..147
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/scrollspy.js on lines 159..162
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/tab.js on lines 135..138

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 9 locations. Consider refactoring.
Open

  $.fn.button.noConflict = function () {
    $.fn.button = old
    return this
  }
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/affix.js on lines 139..142
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/alert.js on lines 83..86
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/carousel.js on lines 199..202
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/collapse.js on lines 190..193
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/dropdown.js on lines 144..147
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/modal.js on lines 298..301
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/scrollspy.js on lines 159..162
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/tab.js on lines 135..138

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 9 locations. Consider refactoring.
Open

  $.fn.affix.noConflict = function () {
    $.fn.affix = old
    return this
  }
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/alert.js on lines 83..86
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/button.js on lines 96..99
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/carousel.js on lines 199..202
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/collapse.js on lines 190..193
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/dropdown.js on lines 144..147
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/modal.js on lines 298..301
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/scrollspy.js on lines 159..162
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/tab.js on lines 135..138

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 9 locations. Consider refactoring.
Open

  $.fn.scrollspy.noConflict = function () {
    $.fn.scrollspy = old
    return this
  }
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/affix.js on lines 139..142
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/alert.js on lines 83..86
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/button.js on lines 96..99
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/carousel.js on lines 199..202
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/collapse.js on lines 190..193
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/dropdown.js on lines 144..147
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/modal.js on lines 298..301
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/tab.js on lines 135..138

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 9 locations. Consider refactoring.
Open

  $.fn.carousel.noConflict = function () {
    $.fn.carousel = old
    return this
  }
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/affix.js on lines 139..142
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/alert.js on lines 83..86
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/button.js on lines 96..99
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/collapse.js on lines 190..193
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/dropdown.js on lines 144..147
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/modal.js on lines 298..301
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/scrollspy.js on lines 159..162
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/tab.js on lines 135..138

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 9 locations. Consider refactoring.
Open

  $.fn.collapse.noConflict = function () {
    $.fn.collapse = old
    return this
  }
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/affix.js on lines 139..142
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/alert.js on lines 83..86
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/button.js on lines 96..99
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/carousel.js on lines 199..202
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/dropdown.js on lines 144..147
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/modal.js on lines 298..301
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/scrollspy.js on lines 159..162
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/tab.js on lines 135..138

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 9 locations. Consider refactoring.
Open

  $.fn.dropdown.noConflict = function () {
    $.fn.dropdown = old
    return this
  }
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/affix.js on lines 139..142
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/alert.js on lines 83..86
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/button.js on lines 96..99
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/carousel.js on lines 199..202
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/collapse.js on lines 190..193
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/modal.js on lines 298..301
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/scrollspy.js on lines 159..162
frontend/app/assets/javascripts/mno_enterprise/twitter/bootstrap/tab.js on lines 135..138

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

Severity
Category
Status
Source
Language