XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

Function delete_schedule has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

        public function delete_schedule($whr_sql_append = '', $eval_after = null)
        {
            if (!empty($_POST['event_id'])) {
                $event_id = (int)$_POST['event_id'];

Severity: Minor
Found in class/APCal.php - About 3 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

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

                for (var x in hs.langDefaults) {
                    if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x];
                    else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined')
                        hs.lang[x] = hs.langDefaults[x];
                }
Severity: Major
Found in assets/images/js/highslide/highslide-with-gallery.js and 3 other locations - About 3 hrs to fix
assets/images/js/highslide/highslide-full.js on lines 919..923
assets/images/js/highslide/highslide-with-html.js on lines 742..746
assets/images/js/highslide/highslide.js on lines 579..583

Duplicated Code

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

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

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

Tuning

This issue has a mass of 110.

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

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

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

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

Refactorings

Further Reading

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

                for (var x in hs.langDefaults) {
                    if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x];
                    else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined')
                        hs.lang[x] = hs.langDefaults[x];
                }
Severity: Major
Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 3 hrs to fix
assets/images/js/highslide/highslide-with-gallery.js on lines 743..747
assets/images/js/highslide/highslide-with-html.js on lines 742..746
assets/images/js/highslide/highslide.js on lines 579..583

Duplicated Code

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

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

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

Tuning

This issue has a mass of 110.

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

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

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

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

Refactorings

Further Reading

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

                for (var x in hs.langDefaults) {
                    if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x];
                    else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined')
                        hs.lang[x] = hs.langDefaults[x];
                }
Severity: Major
Found in assets/images/js/highslide/highslide.js and 3 other locations - About 3 hrs to fix
assets/images/js/highslide/highslide-full.js on lines 919..923
assets/images/js/highslide/highslide-with-gallery.js on lines 743..747
assets/images/js/highslide/highslide-with-html.js on lines 742..746

Duplicated Code

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

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

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

Tuning

This issue has a mass of 110.

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

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

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

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

Refactorings

Further Reading

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

                for (var x in hs.langDefaults) {
                    if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x];
                    else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined')
                        hs.lang[x] = hs.langDefaults[x];
                }
Severity: Major
Found in assets/images/js/highslide/highslide-with-html.js and 3 other locations - About 3 hrs to fix
assets/images/js/highslide/highslide-full.js on lines 919..923
assets/images/js/highslide/highslide-with-gallery.js on lines 743..747
assets/images/js/highslide/highslide.js on lines 579..583

Duplicated Code

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

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

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

Tuning

This issue has a mass of 110.

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

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

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

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

Refactorings

Further Reading

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

        createFullExpand: function () {
            this.fullExpandLabel = hs.createElement(
                'a', {
                    href: 'javascript:hs.expanders[' + this.key + '].doFullExpand();',
                    title: hs.lang.fullExpandTitle,
Severity: Major
Found in assets/images/js/highslide/highslide.js and 1 other location - About 3 hrs to fix
assets/images/js/highslide/highslide-with-html.js on lines 2328..2343

Duplicated Code

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

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

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

Tuning

This issue has a mass of 110.

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

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

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

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

Refactorings

Further Reading

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

        createFullExpand: function () {
            this.fullExpandLabel = hs.createElement(
                'a', {
                    href: 'javascript:hs.expanders[' + this.key + '].doFullExpand();',
                    title: hs.lang.fullExpandTitle,
Severity: Major
Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 3 hrs to fix
assets/images/js/highslide/highslide.js on lines 1813..1828

Duplicated Code

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

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

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

Tuning

This issue has a mass of 110.

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

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

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

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

Refactorings

Further Reading

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

        setObjContainerSize: function (parent, auto) {
            var c = hs.getElementByClass(parent, 'DIV', 'highslide-body');
            if (/(iframe|swf)/.test(this.objectType)) {
                if (this.objectWidth) c.style.width = this.objectWidth + 'px';
                if (this.objectHeight) c.style.height = this.objectHeight + 'px';
Severity: Major
Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 3 hrs to fix
assets/images/js/highslide/highslide-with-html.js on lines 1446..1452

Duplicated Code

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

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

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

Tuning

This issue has a mass of 110.

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

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

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

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

Refactorings

Further Reading

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

        setObjContainerSize: function (parent, auto) {
            var c = hs.getElementByClass(parent, 'DIV', 'highslide-body');
            if (/(iframe|swf)/.test(this.objectType)) {
                if (this.objectWidth) c.style.width = this.objectWidth + 'px';
                if (this.objectHeight) c.style.height = this.objectHeight + 'px';
Severity: Major
Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 3 hrs to fix
assets/images/js/highslide/highslide-full.js on lines 1684..1690

Duplicated Code

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

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

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

Tuning

This issue has a mass of 110.

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

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

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

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

Refactorings

Further Reading

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

        getParam: function (a, param) {
            a.getParams = a.onclick;
            var p = a.getParams ? a.getParams() : null;
            a.getParams = null;

Severity: Major
Found in assets/images/js/highslide/highslide-with-html.js and 3 other locations - About 3 hrs to fix
assets/images/js/highslide/highslide-full.js on lines 477..484
assets/images/js/highslide/highslide-with-gallery.js on lines 335..342
assets/images/js/highslide/highslide.js on lines 250..257

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

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

        getParam: function (a, param) {
            a.getParams = a.onclick;
            var p = a.getParams ? a.getParams() : null;
            a.getParams = null;

Severity: Major
Found in assets/images/js/highslide/highslide-with-gallery.js and 3 other locations - About 3 hrs to fix
assets/images/js/highslide/highslide-full.js on lines 477..484
assets/images/js/highslide/highslide-with-html.js on lines 389..396
assets/images/js/highslide/highslide.js on lines 250..257

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

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

        getParam: function (a, param) {
            a.getParams = a.onclick;
            var p = a.getParams ? a.getParams() : null;
            a.getParams = null;

Severity: Major
Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 3 hrs to fix
assets/images/js/highslide/highslide-with-gallery.js on lines 335..342
assets/images/js/highslide/highslide-with-html.js on lines 389..396
assets/images/js/highslide/highslide.js on lines 250..257

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

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

        getParam: function (a, param) {
            a.getParams = a.onclick;
            var p = a.getParams ? a.getParams() : null;
            a.getParams = null;

Severity: Major
Found in assets/images/js/highslide/highslide.js and 3 other locations - About 3 hrs to fix
assets/images/js/highslide/highslide-full.js on lines 477..484
assets/images/js/highslide/highslide-with-gallery.js on lines 335..342
assets/images/js/highslide/highslide-with-html.js on lines 389..396

Duplicated Code

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

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

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

Tuning

This issue has a mass of 109.

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

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

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

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

Refactorings

Further Reading

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

<?php

if( defined( 'FOR_XOOPS_LANG_CHECKER' ) || ! defined( 'APCAL_MB_LOADED' ) ) {

define( 'APCAL_MB_LOADED' , 1 ) ;
Severity: Major
Found in language/nederlands/main.php and 1 other location - About 3 hrs to fix
language/italian/main.php on lines 1..22

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

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

<?php

if( defined( 'FOR_XOOPS_LANG_CHECKER' ) || ! defined( 'APCAL_MB_LOADED' ) ) {

define( 'APCAL_MB_LOADED' , 1 ) ;
Severity: Major
Found in language/italian/main.php and 1 other location - About 3 hrs to fix
language/nederlands/main.php on lines 1..23

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

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

Method get_calendar_information has 92 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public function get_calendar_information($mode = 'M')
        {
            $ret = array();

            // ���ܾ���
Severity: Major
Found in class/APCal.php - About 3 hrs to fix

    Consider simplifying this complex logical expression.
    Open

                    if (!$isAllCat && !$isDefaultView && !$isToday) {
                        $link = XOOPS_URL . "/modules/apcal/$cat-$smode-$caldate";
                    } elseif (!$isAllCat && !$isDefaultView && $isToday) {
                        $link = XOOPS_URL . "/modules/apcal/$cat-$smode";
                    } elseif (!$isAllCat && $isDefaultView && !$isToday) {
    Severity: Critical
    Found in class/APCal.php - About 3 hrs to fix

      File pluginsmanager.php has 319 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /*
       * You may not change or alter any portion of this comment or credits
       * of supporting developers from this source code or any supporting source code
       * which is considered copyrighted (c) material of the original comment or credit authors.
      Severity: Minor
      Found in admin/pluginsmanager.php - About 3 hrs to fix

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

                if (year) {
                    if (year.year != cal.date.getFullYear()) {
                        if (cal.hilitedYear) {
                            Calendar.removeClass(cal.hilitedYear, "hilite");
                        }
        Severity: Major
        Found in assets/js/jscalendar/calendar.js and 1 other location - About 3 hrs to fix
        assets/js/jscalendar/calendar.js on lines 428..456

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

        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 (mon) {
                if (mon.month != cal.date.getMonth()) {
                    if (cal.hilitedMonth) {
                        Calendar.removeClass(cal.hilitedMonth, "hilite");
                    }
        Severity: Major
        Found in assets/js/jscalendar/calendar.js and 1 other location - About 3 hrs to fix
        assets/js/jscalendar/calendar.js on lines 443..455

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

        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