mambax7/extcal

View on GitHub

Showing 472 of 1,163 total issues

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

            case '4WE':

                $ts        = \mktime(0, 0, 0, $month, 21, $year);
                $dayOfWeek = \date('w', $ts);
                $ts        = (3 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
Severity: Major
Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
class/EventHandler.php on lines 1695..1707
class/EventHandler.php on lines 1708..1720
class/EventHandler.php on lines 1721..1733
class/EventHandler.php on lines 1734..1746
class/EventHandler.php on lines 1747..1759
class/EventHandler.php on lines 1760..1772
class/EventHandler.php on lines 1773..1785
class/EventHandler.php on lines 1786..1798
class/EventHandler.php on lines 1799..1811
class/EventHandler.php on lines 1812..1824
class/EventHandler.php on lines 1825..1837
class/EventHandler.php on lines 1838..1850
class/EventHandler.php on lines 1851..1863
class/EventHandler.php on lines 1864..1876
class/EventHandler.php on lines 1877..1889
class/EventHandler.php on lines 1890..1902
class/EventHandler.php on lines 1903..1915
class/EventHandler.php on lines 1916..1928
class/EventHandler.php on lines 1929..1941
class/EventHandler.php on lines 1942..1954
class/EventHandler.php on lines 1955..1967
class/EventHandler.php on lines 1968..1980
class/EventHandler.php on lines 1981..1993
class/EventHandler.php on lines 1994..2006
class/EventHandler.php on lines 2020..2032
class/EventHandler.php on lines 2033..2045
class/EventHandler.php on lines 2046..2058

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

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

            case '4TU':

                $ts        = \mktime(0, 0, 0, $month, 21, $year);
                $dayOfWeek = \date('w', $ts);
                $ts        = (2 == \date('w', $ts)) ? $ts + (\_EXTCAL_TS_DAY * 7) : $ts;
Severity: Major
Found in class/EventHandler.php and 27 other locations - About 2 hrs to fix
class/EventHandler.php on lines 1695..1707
class/EventHandler.php on lines 1708..1720
class/EventHandler.php on lines 1721..1733
class/EventHandler.php on lines 1734..1746
class/EventHandler.php on lines 1747..1759
class/EventHandler.php on lines 1760..1772
class/EventHandler.php on lines 1773..1785
class/EventHandler.php on lines 1786..1798
class/EventHandler.php on lines 1799..1811
class/EventHandler.php on lines 1812..1824
class/EventHandler.php on lines 1825..1837
class/EventHandler.php on lines 1838..1850
class/EventHandler.php on lines 1851..1863
class/EventHandler.php on lines 1864..1876
class/EventHandler.php on lines 1877..1889
class/EventHandler.php on lines 1890..1902
class/EventHandler.php on lines 1903..1915
class/EventHandler.php on lines 1916..1928
class/EventHandler.php on lines 1929..1941
class/EventHandler.php on lines 1942..1954
class/EventHandler.php on lines 1955..1967
class/EventHandler.php on lines 1968..1980
class/EventHandler.php on lines 1981..1993
class/EventHandler.php on lines 2007..2019
class/EventHandler.php on lines 2020..2032
class/EventHandler.php on lines 2033..2045
class/EventHandler.php on lines 2046..2058

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

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

        removeEventListener: function (el, event, func) {
            try {
                el.removeEventListener(event, func, false);
            } catch (e) {
                try {
Severity: Major
Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-full.js on lines 868..878
assets/js/highslide-with-gallery.js on lines 693..703

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

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

        removeEventListener: function (el, event, func) {
            try {
                el.removeEventListener(event, func, false);
            } catch (e) {
                try {
Severity: Major
Found in assets/js/highslide-full.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-with-gallery.js on lines 693..703
assets/js/highslide.js on lines 529..539

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

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

        removeEventListener: function (el, event, func) {
            try {
                el.removeEventListener(event, func, false);
            } catch (e) {
                try {
Severity: Major
Found in assets/js/highslide-with-gallery.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-full.js on lines 868..878
assets/js/highslide.js on lines 529..539

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

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

        setPos: function (i) {
            this.pos = i;
            this.exp.wrapper.style[this.lt] = i + 'px';

            if (this.exp.outline) this.exp.outline.setPosition();
Severity: Major
Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-full.js on lines 1352..1358
assets/js/highslide-with-gallery.js on lines 1158..1164

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

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

        setPos: function (i) {
            this.pos = i;
            this.exp.wrapper.style[this.lt] = i + 'px';

            if (this.exp.outline) this.exp.outline.setPosition();
Severity: Major
Found in assets/js/highslide-with-gallery.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-full.js on lines 1352..1358
assets/js/highslide.js on lines 973..979

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

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

        setPos: function (i) {
            this.pos = i;
            this.exp.wrapper.style[this.lt] = i + 'px';

            if (this.exp.outline) this.exp.outline.setPosition();
Severity: Major
Found in assets/js/highslide-full.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-with-gallery.js on lines 1158..1164
assets/js/highslide.js on lines 973..979

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

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

                    if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
                        this.createFullExpand();
                        if (this.overlays.length == 1) this.sizeOverlayBox();
                    }
Severity: Major
Found in assets/js/highslide-with-gallery.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-full.js on lines 1671..1674
assets/js/highslide.js on lines 1175..1178

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

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

                    if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
                        this.createFullExpand();
                        if (this.overlays.length == 1) this.sizeOverlayBox();
                    }
Severity: Major
Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-full.js on lines 1671..1674
assets/js/highslide-with-gallery.js on lines 1391..1394

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

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

                    if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
                        this.createFullExpand();
                        if (this.overlays.length == 1) this.sizeOverlayBox();
                    }
Severity: Major
Found in assets/js/highslide-full.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-with-gallery.js on lines 1391..1394
assets/js/highslide.js on lines 1175..1178

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

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 ('' != $p_message) {
            $i                                  = count($g_pcl_trace_entries);
            $g_pcl_trace_entries[$i]['name']    = '';
            $g_pcl_trace_entries[$i]['param']   = '';
            $g_pcl_trace_entries[$i]['message'] = $p_message;
Severity: Major
Found in class/pcltrace.lib.php and 1 other location - About 2 hrs to fix
class/pcltrace.lib.php on lines 249..258

Duplicated Code

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

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

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

Tuning

This issue has a mass of 129.

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

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

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

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

Refactorings

Further Reading

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

        if ('' != $p_message) {
            $i                                  = count($g_pcl_trace_entries);
            $g_pcl_trace_entries[$i]['name']    = '';
            $g_pcl_trace_entries[$i]['param']   = '';
            $g_pcl_trace_entries[$i]['message'] = $p_message;
Severity: Major
Found in class/pcltrace.lib.php and 1 other location - About 2 hrs to fix
class/pcltrace.lib.php on lines 187..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 129.

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

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

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

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

Refactorings

Further Reading

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

        preloadNext: function () {
            var next = this.getAdjacentAnchor(1);
            if (next && next.onclick.toString().match(/hs\.expand/))
                var img = hs.createElement('img', {src: hs.getSrc(next)});
        },
Severity: Major
Found in assets/js/highslide-with-gallery.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-full.js on lines 2346..2350
assets/js/highslide.js on lines 1400..1404

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

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

        preloadNext: function () {
            var next = this.getAdjacentAnchor(1);
            if (next && next.onclick.toString().match(/hs\.expand/))
                var img = hs.createElement('img', {src: hs.getSrc(next)});
        },
Severity: Major
Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-full.js on lines 2346..2350
assets/js/highslide-with-gallery.js on lines 1844..1848

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

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

        preloadNext: function () {
            var next = this.getAdjacentAnchor(1);
            if (next && next.onclick.toString().match(/hs\.expand/))
                var img = hs.createElement('img', {src: hs.getSrc(next)});
        },
Severity: Major
Found in assets/js/highslide-full.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-with-gallery.js on lines 1844..1848
assets/js/highslide.js on lines 1400..1404

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

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

        prepareNextOutline: function () {
            var key = this.key;
            var outlineType = this.outlineType;
            new hs.Outline(outlineType,
                function () {
Severity: Major
Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-full.js on lines 2333..2343
assets/js/highslide-with-gallery.js on lines 1831..1841

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

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

        prepareNextOutline: function () {
            var key = this.key;
            var outlineType = this.outlineType;
            new hs.Outline(outlineType,
                function () {
Severity: Major
Found in assets/js/highslide-with-gallery.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-full.js on lines 2333..2343
assets/js/highslide.js on lines 1387..1397

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

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

        prepareNextOutline: function () {
            var key = this.key;
            var outlineType = this.outlineType;
            new hs.Outline(outlineType,
                function () {
Severity: Major
Found in assets/js/highslide-full.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-with-gallery.js on lines 1831..1841
assets/js/highslide.js on lines 1387..1397

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

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

            hs.extend(overlay, {
                opacity: 1,
                offsetX: 0,
                offsetY: 0,
                dur: (o.fade === 0 || o.fade === false || (o.fade == 2 && hs.ie)) ? 0 : 250
Severity: Major
Found in assets/js/highslide-with-gallery.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-full.js on lines 2722..2727
assets/js/highslide.js on lines 1634..1639

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

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