XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

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

        if (!hs.allowMultipleInstances && !hs.upcoming) {
            if (hs.expanders[key - 1]) hs.expanders[key - 1].close();
            if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey])
                hs.expanders[hs.focusKey].close();
        }
Severity: Major
Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 4 hrs to fix
assets/images/js/highslide/highslide-with-gallery.js on lines 1214..1218
assets/images/js/highslide/highslide-with-html.js on lines 1207..1211
assets/images/js/highslide/highslide.js on lines 1026..1030

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

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

        getExpander: function (el, expOnly) {
            if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
            if (typeof el == 'number') return hs.expanders[el] || null;
            if (typeof el == 'string') el = hs.$(el);
            return hs.expanders[hs.getWrapperKey(el, expOnly)] || null;
Severity: Major
Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 4 hrs to fix
assets/images/js/highslide/highslide-with-gallery.js on lines 554..559
assets/images/js/highslide/highslide-with-html.js on lines 529..534
assets/images/js/highslide/highslide.js on lines 390..395

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

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

        getExpander: function (el, expOnly) {
            if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
            if (typeof el == 'number') return hs.expanders[el] || null;
            if (typeof el == 'string') el = hs.$(el);
            return hs.expanders[hs.getWrapperKey(el, expOnly)] || null;
Severity: Major
Found in assets/images/js/highslide/highslide.js and 3 other locations - About 4 hrs to fix
assets/images/js/highslide/highslide-full.js on lines 698..703
assets/images/js/highslide/highslide-with-gallery.js on lines 554..559
assets/images/js/highslide/highslide-with-html.js on lines 529..534

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

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 ($block_arr[$i]->getVar('visible') != 1) {
            $sseln = ' checked';
            $scoln = '#FF0000';
        } else {
            switch ($block_arr[$i]->getVar('side')) {
Severity: Major
Found in admin/myblocksadmin.php and 1 other location - About 4 hrs to fix
admin/myblocksadmin2.php on lines 169..196

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

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 ($instances[$i]->getVar('visible') != 1) {
            $sseln = ' checked';
            $scoln = '#FF0000';
        } else {
            switch ($instances[$i]->getVar('side')) {
Severity: Major
Found in admin/myblocksadmin2.php and 1 other location - About 4 hrs to fix
admin/myblocksadmin.php on lines 145..172

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

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

        if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) {
            if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) {
                hs.expanders[i].cancelLoading();
            }
        }
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 1404..1408
assets/images/js/highslide/highslide-with-gallery.js on lines 1208..1212
assets/images/js/highslide/highslide-with-html.js on lines 1201..1205

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

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

        if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) {
            if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) {
                hs.expanders[i].cancelLoading();
            }
        }
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 1208..1212
assets/images/js/highslide/highslide-with-html.js on lines 1201..1205
assets/images/js/highslide/highslide.js on lines 1020..1024

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

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

        if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) {
            if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) {
                hs.expanders[i].cancelLoading();
            }
        }
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 1404..1408
assets/images/js/highslide/highslide-with-gallery.js on lines 1208..1212
assets/images/js/highslide/highslide.js on lines 1020..1024

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

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

        if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) {
            if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) {
                hs.expanders[i].cancelLoading();
            }
        }
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 1404..1408
assets/images/js/highslide/highslide-with-html.js on lines 1201..1205
assets/images/js/highslide/highslide.js on lines 1020..1024

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

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

        writeCredits: function () {
            this.credits = hs.createElement('a', {
                href: hs.creditsHref,
                target: hs.creditsTarget,
                className: 'highslide-credits',
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 1427..1439

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

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

        writeCredits: function () {
            this.credits = hs.createElement('a', {
                href: hs.creditsHref,
                target: hs.creditsTarget,
                className: 'highslide-credits',
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 1867..1879

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

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

Function getOverlays has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

        getOverlays: function () {
            this.getInline(['heading', 'caption'], true);
            if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
            if (hs.showCredits) this.writeCredits();
            for (var i = 0; i < hs.overlays.length; i++) {
Severity: Minor
Found in assets/images/js/highslide/highslide-with-html.js - 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

Function AntiOffsiteLinking has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

    public function AntiOffsiteLinking()
    {
        // Optional anti-offsite hijacking of the thumbnail script
        $allow = true;
        if ($allow && $this->config_nooffsitelink_enabled
Severity: Minor
Found in thumbs/phpthumb.class.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

Function GD2ICOstring has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
Open

    public function GD2ICOstring(&$gd_image_array)
    {
        foreach ($gd_image_array as $key => $gd_image) {
            $ImageWidths[$key]  = imagesx($gd_image);
            $ImageHeights[$key] = imagesy($gd_image);
Severity: Minor
Found in thumbs/phpthumb.ico.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

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

            if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
                this.imgSize = i;
                this.size = Math.max(this.size, this.imgSize);
                exp.content.style[this.lt] = this.get('imgPad') + 'px';
            } else
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 1322..1327
assets/images/js/highslide/highslide-with-gallery.js on lines 1142..1147
assets/images/js/highslide/highslide.js on lines 961..966

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

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

            if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
                this.imgSize = i;
                this.size = Math.max(this.size, this.imgSize);
                exp.content.style[this.lt] = this.get('imgPad') + 'px';
            } else
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 1322..1327
assets/images/js/highslide/highslide-with-html.js on lines 1127..1132
assets/images/js/highslide/highslide.js on lines 961..966

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

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

        destroyObject: function () {
            if (hs.ie && this.iframe)
                try {
                    this.iframe.contentWindow.document.body.innerHTML = '';
                } catch (e) {
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 2073..2081

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

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

            if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
                this.imgSize = i;
                this.size = Math.max(this.size, this.imgSize);
                exp.content.style[this.lt] = this.get('imgPad') + 'px';
            } else
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 1142..1147
assets/images/js/highslide/highslide-with-html.js on lines 1127..1132
assets/images/js/highslide/highslide.js on lines 961..966

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

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

            if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
                this.imgSize = i;
                this.size = Math.max(this.size, this.imgSize);
                exp.content.style[this.lt] = this.get('imgPad') + 'px';
            } else
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 1322..1327
assets/images/js/highslide/highslide-with-gallery.js on lines 1142..1147
assets/images/js/highslide/highslide-with-html.js on lines 1127..1132

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

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

        destroyObject: function () {
            if (hs.ie && this.iframe)
                try {
                    this.iframe.contentWindow.document.body.innerHTML = '';
                } catch (e) {
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 2642..2650

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

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