IntegerMan/angularIF

View on GitHub
src/assets/primeng/components/tooltip/tooltip.js

Summary

Maintainability
F
1 wk
Test Coverage

Function Tooltip has a Cognitive Complexity of 91 (exceeds 5 allowed). Consider refactoring.
Open

var Tooltip = (function () {
    function Tooltip(el, domHandler, renderer) {
        this.el = el;
        this.domHandler = domHandler;
        this.renderer = renderer;
Severity: Minor
Found in src/assets/primeng/components/tooltip/tooltip.js - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function Tooltip has 260 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var Tooltip = (function () {
    function Tooltip(el, domHandler, renderer) {
        this.el = el;
        this.domHandler = domHandler;
        this.renderer = renderer;
Severity: Major
Found in src/assets/primeng/components/tooltip/tooltip.js - About 1 day to fix

    File tooltip.js has 376 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    "use strict";
    var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
        var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
        if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
        else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    Severity: Minor
    Found in src/assets/primeng/components/tooltip/tooltip.js - About 5 hrs to fix

      Function __decorate has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

      var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
          var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
          if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
          else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
          return c > 3 && r && Object.defineProperty(target, key, r), r;
      Severity: Minor
      Found in src/assets/primeng/components/tooltip/tooltip.js - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function align has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          Tooltip.prototype.align = function () {
              var position = this.tooltipPosition;
              switch (position) {
                  case 'top':
                      this.alignTop();
      Severity: Minor
      Found in src/assets/primeng/components/tooltip/tooltip.js - About 1 hr to fix

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

        var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
            var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
            if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
            else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
            return c > 3 && r && Object.defineProperty(target, key, r), r;
        Severity: Major
        Found in src/assets/primeng/components/tooltip/tooltip.js and 76 other locations - About 1 day to fix
        src/assets/primeng/components/accordion/accordion.js on lines 2..7
        src/assets/primeng/components/autocomplete/autocomplete.js on lines 2..7
        src/assets/primeng/components/blockui/blockui.js on lines 2..7
        src/assets/primeng/components/breadcrumb/breadcrumb.js on lines 2..7
        src/assets/primeng/components/button/button.js on lines 2..7
        src/assets/primeng/components/calendar/calendar.js on lines 2..7
        src/assets/primeng/components/captcha/captcha.js on lines 2..7
        src/assets/primeng/components/carousel/carousel.js on lines 2..7
        src/assets/primeng/components/chart/chart.js on lines 2..7
        src/assets/primeng/components/checkbox/checkbox.js on lines 2..7
        src/assets/primeng/components/chips/chips.js on lines 2..7
        src/assets/primeng/components/codehighlighter/codehighlighter.js on lines 2..7
        src/assets/primeng/components/colorpicker/colorpicker.js on lines 2..7
        src/assets/primeng/components/common/confirmationservice.js on lines 2..7
        src/assets/primeng/components/common/messageservice.js on lines 2..7
        src/assets/primeng/components/common/shared.js on lines 2..7
        src/assets/primeng/components/common/treedragdropservice.js on lines 2..7
        src/assets/primeng/components/confirmdialog/confirmdialog.js on lines 2..7
        src/assets/primeng/components/contextmenu/contextmenu.js on lines 2..7
        src/assets/primeng/components/datagrid/datagrid.js on lines 2..7
        src/assets/primeng/components/datalist/datalist.js on lines 2..7
        src/assets/primeng/components/datascroller/datascroller.js on lines 2..7
        src/assets/primeng/components/datatable/datatable.js on lines 2..7
        src/assets/primeng/components/defer/defer.js on lines 2..7
        src/assets/primeng/components/dialog/dialog.js on lines 2..7
        src/assets/primeng/components/dom/domhandler.js on lines 2..7
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 2..7
        src/assets/primeng/components/dropdown/dropdown.js on lines 2..7
        src/assets/primeng/components/editor/editor.js on lines 2..7
        src/assets/primeng/components/fieldset/fieldset.js on lines 2..7
        src/assets/primeng/components/fileupload/fileupload.js on lines 2..7
        src/assets/primeng/components/galleria/galleria.js on lines 2..7
        src/assets/primeng/components/gmap/gmap.js on lines 2..7
        src/assets/primeng/components/growl/growl.js on lines 2..7
        src/assets/primeng/components/inplace/inplace.js on lines 2..7
        src/assets/primeng/components/inputmask/inputmask.js on lines 2..7
        src/assets/primeng/components/inputswitch/inputswitch.js on lines 2..7
        src/assets/primeng/components/inputtext/inputtext.js on lines 2..7
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 2..7
        src/assets/primeng/components/lightbox/lightbox.js on lines 2..7
        src/assets/primeng/components/listbox/listbox.js on lines 2..7
        src/assets/primeng/components/megamenu/megamenu.js on lines 2..7
        src/assets/primeng/components/menu/menu.js on lines 2..7
        src/assets/primeng/components/menubar/menubar.js on lines 2..7
        src/assets/primeng/components/messages/messages.js on lines 2..7
        src/assets/primeng/components/multiselect/multiselect.js on lines 2..7
        src/assets/primeng/components/orderlist/orderlist.js on lines 2..7
        src/assets/primeng/components/organizationchart/organizationchart.js on lines 2..7
        src/assets/primeng/components/overlaypanel/overlaypanel.js on lines 2..7
        src/assets/primeng/components/paginator/paginator.js on lines 2..7
        src/assets/primeng/components/panel/panel.js on lines 2..7
        src/assets/primeng/components/panelmenu/panelmenu.js on lines 12..17
        src/assets/primeng/components/password/password.js on lines 2..7
        src/assets/primeng/components/picklist/picklist.js on lines 2..7
        src/assets/primeng/components/progressbar/progressbar.js on lines 2..7
        src/assets/primeng/components/radiobutton/radiobutton.js on lines 2..7
        src/assets/primeng/components/rating/rating.js on lines 2..7
        src/assets/primeng/components/schedule/schedule.js on lines 2..7
        src/assets/primeng/components/selectbutton/selectbutton.js on lines 2..7
        src/assets/primeng/components/sidebar/sidebar.js on lines 2..7
        src/assets/primeng/components/slidemenu/slidemenu.js on lines 2..7
        src/assets/primeng/components/slider/slider.js on lines 2..7
        src/assets/primeng/components/spinner/spinner.js on lines 2..7
        src/assets/primeng/components/splitbutton/splitbutton.js on lines 2..7
        src/assets/primeng/components/steps/steps.js on lines 2..7
        src/assets/primeng/components/tabmenu/tabmenu.js on lines 2..7
        src/assets/primeng/components/tabview/tabview.js on lines 2..7
        src/assets/primeng/components/terminal/terminal.js on lines 2..7
        src/assets/primeng/components/terminal/terminalservice.js on lines 2..7
        src/assets/primeng/components/tieredmenu/tieredmenu.js on lines 2..7
        src/assets/primeng/components/togglebutton/togglebutton.js on lines 2..7
        src/assets/primeng/components/toolbar/toolbar.js on lines 2..7
        src/assets/primeng/components/tree/tree.js on lines 2..7
        src/assets/primeng/components/treetable/treetable.js on lines 2..7
        src/assets/primeng/components/tristatecheckbox/tristatecheckbox.js on lines 2..7
        src/assets/primeng/components/utils/objectutils.js on lines 2..7

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

        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

                    case 'left':
                        this.alignLeft();
                        if (this.isOutOfBounds()) {
                            this.alignRight();
                            if (this.isOutOfBounds()) {
        Severity: Major
        Found in src/assets/primeng/components/tooltip/tooltip.js and 1 other location - About 2 hrs to fix
        src/assets/primeng/components/tooltip/tooltip.js on lines 179..190

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

        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

                    case 'right':
                        this.alignRight();
                        if (this.isOutOfBounds()) {
                            this.alignLeft();
                            if (this.isOutOfBounds()) {
        Severity: Major
        Found in src/assets/primeng/components/tooltip/tooltip.js and 1 other location - About 2 hrs to fix
        src/assets/primeng/components/tooltip/tooltip.js on lines 167..178

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

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

        var __metadata = (this && this.__metadata) || function (k, v) {
            if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
        };
        Severity: Major
        Found in src/assets/primeng/components/tooltip/tooltip.js and 70 other locations - About 1 hr to fix
        src/assets/primeng/components/accordion/accordion.js on lines 8..10
        src/assets/primeng/components/autocomplete/autocomplete.js on lines 8..10
        src/assets/primeng/components/blockui/blockui.js on lines 8..10
        src/assets/primeng/components/breadcrumb/breadcrumb.js on lines 8..10
        src/assets/primeng/components/button/button.js on lines 8..10
        src/assets/primeng/components/calendar/calendar.js on lines 8..10
        src/assets/primeng/components/captcha/captcha.js on lines 8..10
        src/assets/primeng/components/carousel/carousel.js on lines 8..10
        src/assets/primeng/components/chart/chart.js on lines 8..10
        src/assets/primeng/components/checkbox/checkbox.js on lines 8..10
        src/assets/primeng/components/chips/chips.js on lines 8..10
        src/assets/primeng/components/codehighlighter/codehighlighter.js on lines 8..10
        src/assets/primeng/components/colorpicker/colorpicker.js on lines 8..10
        src/assets/primeng/components/common/shared.js on lines 8..10
        src/assets/primeng/components/confirmdialog/confirmdialog.js on lines 8..10
        src/assets/primeng/components/contextmenu/contextmenu.js on lines 8..10
        src/assets/primeng/components/datagrid/datagrid.js on lines 8..10
        src/assets/primeng/components/datalist/datalist.js on lines 8..10
        src/assets/primeng/components/datascroller/datascroller.js on lines 8..10
        src/assets/primeng/components/datatable/datatable.js on lines 8..10
        src/assets/primeng/components/defer/defer.js on lines 8..10
        src/assets/primeng/components/dialog/dialog.js on lines 8..10
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 8..10
        src/assets/primeng/components/dropdown/dropdown.js on lines 8..10
        src/assets/primeng/components/editor/editor.js on lines 8..10
        src/assets/primeng/components/fieldset/fieldset.js on lines 8..10
        src/assets/primeng/components/fileupload/fileupload.js on lines 8..10
        src/assets/primeng/components/galleria/galleria.js on lines 8..10
        src/assets/primeng/components/gmap/gmap.js on lines 8..10
        src/assets/primeng/components/growl/growl.js on lines 8..10
        src/assets/primeng/components/inplace/inplace.js on lines 8..10
        src/assets/primeng/components/inputmask/inputmask.js on lines 8..10
        src/assets/primeng/components/inputswitch/inputswitch.js on lines 8..10
        src/assets/primeng/components/inputtext/inputtext.js on lines 8..10
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 8..10
        src/assets/primeng/components/lightbox/lightbox.js on lines 8..10
        src/assets/primeng/components/listbox/listbox.js on lines 8..10
        src/assets/primeng/components/megamenu/megamenu.js on lines 8..10
        src/assets/primeng/components/menu/menu.js on lines 8..10
        src/assets/primeng/components/menubar/menubar.js on lines 8..10
        src/assets/primeng/components/messages/messages.js on lines 8..10
        src/assets/primeng/components/multiselect/multiselect.js on lines 8..10
        src/assets/primeng/components/orderlist/orderlist.js on lines 8..10
        src/assets/primeng/components/organizationchart/organizationchart.js on lines 8..10
        src/assets/primeng/components/overlaypanel/overlaypanel.js on lines 8..10
        src/assets/primeng/components/paginator/paginator.js on lines 8..10
        src/assets/primeng/components/panel/panel.js on lines 8..10
        src/assets/primeng/components/panelmenu/panelmenu.js on lines 18..20
        src/assets/primeng/components/password/password.js on lines 8..10
        src/assets/primeng/components/picklist/picklist.js on lines 8..10
        src/assets/primeng/components/progressbar/progressbar.js on lines 8..10
        src/assets/primeng/components/radiobutton/radiobutton.js on lines 8..10
        src/assets/primeng/components/rating/rating.js on lines 8..10
        src/assets/primeng/components/schedule/schedule.js on lines 8..10
        src/assets/primeng/components/selectbutton/selectbutton.js on lines 8..10
        src/assets/primeng/components/sidebar/sidebar.js on lines 8..10
        src/assets/primeng/components/slidemenu/slidemenu.js on lines 8..10
        src/assets/primeng/components/slider/slider.js on lines 8..10
        src/assets/primeng/components/spinner/spinner.js on lines 8..10
        src/assets/primeng/components/splitbutton/splitbutton.js on lines 8..10
        src/assets/primeng/components/steps/steps.js on lines 8..10
        src/assets/primeng/components/tabmenu/tabmenu.js on lines 8..10
        src/assets/primeng/components/tabview/tabview.js on lines 8..10
        src/assets/primeng/components/terminal/terminal.js on lines 8..10
        src/assets/primeng/components/tieredmenu/tieredmenu.js on lines 8..10
        src/assets/primeng/components/togglebutton/togglebutton.js on lines 8..10
        src/assets/primeng/components/toolbar/toolbar.js on lines 8..10
        src/assets/primeng/components/tree/tree.js on lines 8..10
        src/assets/primeng/components/treetable/treetable.js on lines 8..10
        src/assets/primeng/components/tristatecheckbox/tristatecheckbox.js on lines 8..10

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

                var top = hostOffset.top + (this.domHandler.getOuterHeight(this.el.nativeElement) - this.domHandler.getOuterHeight(this.container)) / 2;
        Severity: Major
        Found in src/assets/primeng/components/tooltip/tooltip.js and 3 other locations - About 1 hr to fix
        src/assets/primeng/components/tooltip/tooltip.js on lines 213..213
        src/assets/primeng/components/tooltip/tooltip.js on lines 221..221
        src/assets/primeng/components/tooltip/tooltip.js on lines 230..230

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

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

                var left = hostOffset.left + (this.domHandler.getOuterWidth(this.el.nativeElement) - this.domHandler.getOuterWidth(this.container)) / 2;
        Severity: Major
        Found in src/assets/primeng/components/tooltip/tooltip.js and 3 other locations - About 1 hr to fix
        src/assets/primeng/components/tooltip/tooltip.js on lines 204..204
        src/assets/primeng/components/tooltip/tooltip.js on lines 213..213
        src/assets/primeng/components/tooltip/tooltip.js on lines 221..221

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

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

                var top = hostOffset.top + (this.domHandler.getOuterHeight(this.el.nativeElement) - this.domHandler.getOuterHeight(this.container)) / 2;
        Severity: Major
        Found in src/assets/primeng/components/tooltip/tooltip.js and 3 other locations - About 1 hr to fix
        src/assets/primeng/components/tooltip/tooltip.js on lines 204..204
        src/assets/primeng/components/tooltip/tooltip.js on lines 221..221
        src/assets/primeng/components/tooltip/tooltip.js on lines 230..230

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

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

                var left = hostOffset.left + (this.domHandler.getOuterWidth(this.el.nativeElement) - this.domHandler.getOuterWidth(this.container)) / 2;
        Severity: Major
        Found in src/assets/primeng/components/tooltip/tooltip.js and 3 other locations - About 1 hr to fix
        src/assets/primeng/components/tooltip/tooltip.js on lines 204..204
        src/assets/primeng/components/tooltip/tooltip.js on lines 213..213
        src/assets/primeng/components/tooltip/tooltip.js on lines 230..230

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

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

            Tooltip.prototype.unbindDocumentResizeListener = function () {
                if (this.documentResizeListener) {
                    this.documentResizeListener();
                    this.documentResizeListener = null;
                }
        Severity: Major
        Found in src/assets/primeng/components/tooltip/tooltip.js and 14 other locations - About 50 mins to fix
        src/assets/primeng/components/autocomplete/autocomplete.js on lines 421..426
        src/assets/primeng/components/calendar/calendar.js on lines 1093..1098
        src/assets/primeng/components/colorpicker/colorpicker.js on lines 203..208
        src/assets/primeng/components/colorpicker/colorpicker.js on lines 222..227
        src/assets/primeng/components/colorpicker/colorpicker.js on lines 239..244
        src/assets/primeng/components/contextmenu/contextmenu.js on lines 183..188
        src/assets/primeng/components/datatable/datatable.js on lines 1402..1407
        src/assets/primeng/components/dialog/dialog.js on lines 158..163
        src/assets/primeng/components/dialog/dialog.js on lines 323..328
        src/assets/primeng/components/dropdown/dropdown.js on lines 370..375
        src/assets/primeng/components/multiselect/multiselect.js on lines 288..293
        src/assets/primeng/components/sidebar/sidebar.js on lines 106..111
        src/assets/primeng/components/splitbutton/splitbutton.js on lines 100..105
        src/assets/primeng/components/tieredmenu/tieredmenu.js on lines 107..112

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

        __decorate([
            core_1.HostListener('focus', ['$event']),
            __metadata("design:type", Function),
            __metadata("design:paramtypes", [Event]),
            __metadata("design:returntype", void 0)
        Severity: Major
        Found in src/assets/primeng/components/tooltip/tooltip.js and 22 other locations - About 40 mins to fix
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 79..84
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 85..90
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 91..96
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 97..102
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 103..108
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 190..195
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 196..201
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 202..207
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 208..213
        src/assets/primeng/components/inputtext/inputtext.js on lines 30..35
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 74..79
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 80..85
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 86..91
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 92..97
        src/assets/primeng/components/password/password.js on lines 142..147
        src/assets/primeng/components/password/password.js on lines 148..153
        src/assets/primeng/components/password/password.js on lines 154..159
        src/assets/primeng/components/password/password.js on lines 160..165
        src/assets/primeng/components/tooltip/tooltip.js on lines 321..326
        src/assets/primeng/components/tooltip/tooltip.js on lines 327..332
        src/assets/primeng/components/tooltip/tooltip.js on lines 339..344
        src/assets/primeng/components/tooltip/tooltip.js on lines 345..350

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

        __decorate([
            core_1.HostListener('blur', ['$event']),
            __metadata("design:type", Function),
            __metadata("design:paramtypes", [Event]),
            __metadata("design:returntype", void 0)
        Severity: Major
        Found in src/assets/primeng/components/tooltip/tooltip.js and 22 other locations - About 40 mins to fix
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 79..84
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 85..90
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 91..96
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 97..102
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 103..108
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 190..195
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 196..201
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 202..207
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 208..213
        src/assets/primeng/components/inputtext/inputtext.js on lines 30..35
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 74..79
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 80..85
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 86..91
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 92..97
        src/assets/primeng/components/password/password.js on lines 142..147
        src/assets/primeng/components/password/password.js on lines 148..153
        src/assets/primeng/components/password/password.js on lines 154..159
        src/assets/primeng/components/password/password.js on lines 160..165
        src/assets/primeng/components/tooltip/tooltip.js on lines 321..326
        src/assets/primeng/components/tooltip/tooltip.js on lines 327..332
        src/assets/primeng/components/tooltip/tooltip.js on lines 333..338
        src/assets/primeng/components/tooltip/tooltip.js on lines 345..350

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

        __decorate([
            core_1.HostListener('mouseenter', ['$event']),
            __metadata("design:type", Function),
            __metadata("design:paramtypes", [Event]),
            __metadata("design:returntype", void 0)
        Severity: Major
        Found in src/assets/primeng/components/tooltip/tooltip.js and 22 other locations - About 40 mins to fix
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 79..84
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 85..90
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 91..96
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 97..102
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 103..108
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 190..195
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 196..201
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 202..207
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 208..213
        src/assets/primeng/components/inputtext/inputtext.js on lines 30..35
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 74..79
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 80..85
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 86..91
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 92..97
        src/assets/primeng/components/password/password.js on lines 142..147
        src/assets/primeng/components/password/password.js on lines 148..153
        src/assets/primeng/components/password/password.js on lines 154..159
        src/assets/primeng/components/password/password.js on lines 160..165
        src/assets/primeng/components/tooltip/tooltip.js on lines 327..332
        src/assets/primeng/components/tooltip/tooltip.js on lines 333..338
        src/assets/primeng/components/tooltip/tooltip.js on lines 339..344
        src/assets/primeng/components/tooltip/tooltip.js on lines 345..350

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

        __decorate([
            core_1.HostListener('click', ['$event']),
            __metadata("design:type", Function),
            __metadata("design:paramtypes", [Event]),
            __metadata("design:returntype", void 0)
        Severity: Major
        Found in src/assets/primeng/components/tooltip/tooltip.js and 22 other locations - About 40 mins to fix
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 79..84
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 85..90
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 91..96
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 97..102
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 103..108
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 190..195
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 196..201
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 202..207
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 208..213
        src/assets/primeng/components/inputtext/inputtext.js on lines 30..35
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 74..79
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 80..85
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 86..91
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 92..97
        src/assets/primeng/components/password/password.js on lines 142..147
        src/assets/primeng/components/password/password.js on lines 148..153
        src/assets/primeng/components/password/password.js on lines 154..159
        src/assets/primeng/components/password/password.js on lines 160..165
        src/assets/primeng/components/tooltip/tooltip.js on lines 321..326
        src/assets/primeng/components/tooltip/tooltip.js on lines 327..332
        src/assets/primeng/components/tooltip/tooltip.js on lines 333..338
        src/assets/primeng/components/tooltip/tooltip.js on lines 339..344

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

        __decorate([
            core_1.HostListener('mouseleave', ['$event']),
            __metadata("design:type", Function),
            __metadata("design:paramtypes", [Event]),
            __metadata("design:returntype", void 0)
        Severity: Major
        Found in src/assets/primeng/components/tooltip/tooltip.js and 22 other locations - About 40 mins to fix
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 79..84
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 85..90
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 91..96
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 97..102
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 103..108
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 190..195
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 196..201
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 202..207
        src/assets/primeng/components/dragdrop/dragdrop.js on lines 208..213
        src/assets/primeng/components/inputtext/inputtext.js on lines 30..35
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 74..79
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 80..85
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 86..91
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 92..97
        src/assets/primeng/components/password/password.js on lines 142..147
        src/assets/primeng/components/password/password.js on lines 148..153
        src/assets/primeng/components/password/password.js on lines 154..159
        src/assets/primeng/components/password/password.js on lines 160..165
        src/assets/primeng/components/tooltip/tooltip.js on lines 321..326
        src/assets/primeng/components/tooltip/tooltip.js on lines 333..338
        src/assets/primeng/components/tooltip/tooltip.js on lines 339..344
        src/assets/primeng/components/tooltip/tooltip.js on lines 345..350

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

        TooltipModule = __decorate([
            core_1.NgModule({
                imports: [common_1.CommonModule],
                exports: [Tooltip],
                declarations: [Tooltip]
        Severity: Major
        Found in src/assets/primeng/components/tooltip/tooltip.js and 29 other locations - About 40 mins to fix
        src/assets/primeng/components/blockui/blockui.js on lines 88..94
        src/assets/primeng/components/button/button.js on lines 121..127
        src/assets/primeng/components/captcha/captcha.js on lines 127..133
        src/assets/primeng/components/chart/chart.js on lines 119..125
        src/assets/primeng/components/checkbox/checkbox.js on lines 157..163
        src/assets/primeng/components/codehighlighter/codehighlighter.js on lines 35..41
        src/assets/primeng/components/colorpicker/colorpicker.js on lines 478..484
        src/assets/primeng/components/defer/defer.js on lines 77..83
        src/assets/primeng/components/galleria/galleria.js on lines 216..222
        src/assets/primeng/components/gmap/gmap.js on lines 196..202
        src/assets/primeng/components/growl/growl.js on lines 206..212
        src/assets/primeng/components/inputswitch/inputswitch.js on lines 186..192
        src/assets/primeng/components/inputtext/inputtext.js on lines 55..61
        src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 119..125
        src/assets/primeng/components/lightbox/lightbox.js on lines 203..209
        src/assets/primeng/components/messages/messages.js on lines 113..119
        src/assets/primeng/components/overlaypanel/overlaypanel.js on lines 163..169
        src/assets/primeng/components/paginator/paginator.js on lines 179..185
        src/assets/primeng/components/password/password.js on lines 186..192
        src/assets/primeng/components/progressbar/progressbar.js on lines 45..51
        src/assets/primeng/components/radiobutton/radiobutton.js on lines 122..128
        src/assets/primeng/components/rating/rating.js on lines 134..140
        src/assets/primeng/components/schedule/schedule.js on lines 514..520
        src/assets/primeng/components/selectbutton/selectbutton.js on lines 137..143
        src/assets/primeng/components/sidebar/sidebar.js on lines 199..205
        src/assets/primeng/components/slider/slider.js on lines 336..342
        src/assets/primeng/components/togglebutton/togglebutton.js on lines 141..147
        src/assets/primeng/components/toolbar/toolbar.js on lines 39..45
        src/assets/primeng/components/tristatecheckbox/tristatecheckbox.js on lines 122..128

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

            Tooltip.prototype.onMouseLeave = function (e) {
                if (this.tooltipEvent === 'hover') {
                    this.deactivate(true);
                }
            };
        Severity: Minor
        Found in src/assets/primeng/components/tooltip/tooltip.js and 2 other locations - About 35 mins to fix
        src/assets/primeng/components/tooltip/tooltip.js on lines 45..49
        src/assets/primeng/components/tooltip/tooltip.js on lines 50..54

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

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

            Tooltip.prototype.onBlur = function (e) {
                if (this.tooltipEvent === 'focus') {
                    this.deactivate(true);
                }
            };
        Severity: Minor
        Found in src/assets/primeng/components/tooltip/tooltip.js and 2 other locations - About 35 mins to fix
        src/assets/primeng/components/tooltip/tooltip.js on lines 35..39
        src/assets/primeng/components/tooltip/tooltip.js on lines 50..54

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

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

            Tooltip.prototype.onClick = function (e) {
                if (this.tooltipEvent === 'hover') {
                    this.deactivate(true);
                }
            };
        Severity: Minor
        Found in src/assets/primeng/components/tooltip/tooltip.js and 2 other locations - About 35 mins to fix
        src/assets/primeng/components/tooltip/tooltip.js on lines 35..39
        src/assets/primeng/components/tooltip/tooltip.js on lines 45..49

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

        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