mambax7/extcal

View on GitHub

Showing 1,163 of 1,163 total issues

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

    if (hs.ie && window == window.top) {
        (function () {
            try {
                document.documentElement.doScroll('left');
            } catch (e) {
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 2633..2643
assets/js/highslide.js on lines 1870..1880

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

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 (hs.ie && window == window.top) {
        (function () {
            try {
                document.documentElement.doScroll('left');
            } catch (e) {
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 3339..3349
assets/js/highslide.js on lines 1870..1880

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

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 (hs.ie && window == window.top) {
        (function () {
            try {
                document.documentElement.doScroll('left');
            } catch (e) {
Severity: Major
Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
assets/js/highslide-full.js on lines 3339..3349
assets/js/highslide-with-gallery.js on lines 2633..2643

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

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 '2SU':

                $ts        = \mktime(0, 0, 0, $month, 7, $year);
                $dayOfWeek = \date('w', $ts);
                $ts        = (0 == \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 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 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

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

            case '2TU':

                $ts        = \mktime(0, 0, 0, $month, 7, $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 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 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

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

            case '3MO':

                $ts        = \mktime(0, 0, 0, $month, 14, $year);
                $dayOfWeek = \date('w', $ts);
                $ts        = (1 == \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 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 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

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

            case '2TH':

                $ts        = \mktime(0, 0, 0, $month, 7, $year);
                $dayOfWeek = \date('w', $ts);
                $ts        = (4 == \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 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 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

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

            case '3FR':

                $ts        = \mktime(0, 0, 0, $month, 14, $year);
                $dayOfWeek = \date('w', $ts);
                $ts        = (5 == \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 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 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

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

            case '1FR':

                $ts        = \mktime(0, 0, 0, $month, 1, $year);
                $dayOfWeek = \date('w', $ts);
                $ts        = (5 == \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 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 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

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

            case '3SA':

                $ts        = \mktime(0, 0, 0, $month, 14, $year);
                $dayOfWeek = \date('w', $ts);
                $ts        = (6 == \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 1968..1980
class/EventHandler.php on lines 1981..1993
class/EventHandler.php on lines 1994..2006
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

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

            case '2FR':

                $ts        = \mktime(0, 0, 0, $month, 7, $year);
                $dayOfWeek = \date('w', $ts);
                $ts        = (5 == \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 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 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

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

            case '1SA':

                $ts        = \mktime(0, 0, 0, $month, 1, $year);
                $dayOfWeek = \date('w', $ts);
                $ts        = (6 == \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 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 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

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

            case '2SA':

                $ts        = \mktime(0, 0, 0, $month, 7, $year);
                $dayOfWeek = \date('w', $ts);
                $ts        = (6 == \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 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 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

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

            case '2MO':

                $ts        = \mktime(0, 0, 0, $month, 7, $year);
                $dayOfWeek = \date('w', $ts);
                $ts        = (1 == \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 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 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

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

            case '2WE':

                $ts        = \mktime(0, 0, 0, $month, 7, $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 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 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

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

            case '3WE':

                $ts        = \mktime(0, 0, 0, $month, 14, $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 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 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

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

            case '4SU':

                $ts        = \mktime(0, 0, 0, $month, 21, $year);
                $dayOfWeek = \date('w', $ts);
                $ts        = (0 == \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 1981..1993
class/EventHandler.php on lines 1994..2006
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

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

            case '1TH':

                $ts        = \mktime(0, 0, 0, $month, 1, $year);
                $dayOfWeek = \date('w', $ts);
                $ts        = (4 == \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 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 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

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

            case '3TH':

                $ts        = \mktime(0, 0, 0, $month, 14, $year);
                $dayOfWeek = \date('w', $ts);
                $ts        = (4 == \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 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 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

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

            case '3TU':

                $ts        = \mktime(0, 0, 0, $month, 14, $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 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 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

Severity
Category
Status
Source
Language