XoopsModules25x/apcal

View on GitHub

Showing 705 of 26,336 total issues

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

Calendar._DN = new Array
("Svçtdiena",
    "Pirmdiena",
    "Otrdiena",
    "Treðdiena",
Severity: Major
Found in assets/js/jscalendar/lang/calendar-lv.js and 15 other locations - About 30 mins to fix
assets/js/jscalendar/lang/calendar-big5-utf8.js on lines 13..21
assets/js/jscalendar/lang/calendar-big5.js on lines 13..21
assets/js/jscalendar/lang/calendar-ca.js on lines 13..21
assets/js/jscalendar/lang/calendar-da.js on lines 13..21
assets/js/jscalendar/lang/calendar-de.js on lines 13..21
assets/js/jscalendar/lang/calendar-en.js on lines 13..21
assets/js/jscalendar/lang/calendar-jp.js on lines 13..21
assets/js/jscalendar/lang/calendar-lt-utf8.js on lines 13..21
assets/js/jscalendar/lang/calendar-lt.js on lines 13..21
assets/js/jscalendar/lang/calendar-no.js on lines 13..21
assets/js/jscalendar/lang/calendar-pt.js on lines 13..21
assets/js/jscalendar/lang/calendar-ru.js on lines 13..21
assets/js/jscalendar/lang/calendar-ru_win_.js on lines 13..21
assets/js/jscalendar/lang/calendar-tw-utf8.js on lines 13..21
assets/js/jscalendar/lang/calendar-tw.js on lines 13..21

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

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

                Math.easeOutQuad = function (t, b, c, d) {
                    return -c * (t /= d) * (t - 2) + b;
                };
Severity: Minor
Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 30 mins to fix
assets/images/js/highslide/highslide-with-gallery.js on lines 789..791

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

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

                Math.easeOutQuad = function (t, b, c, d) {
                    return -c * (t /= d) * (t - 2) + b;
                };
Severity: Minor
Found in assets/images/js/highslide/highslide-with-gallery.js and 1 other location - About 30 mins to fix
assets/images/js/highslide/highslide-full.js on lines 967..969

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

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

            for ($m = 0; $m < 60; $m += 5) {
                if ($m == $start_min) {
                    $select_start_min .= "<option value='$m' selected>" . sprintf('%02d', $m) . "</option>\n";
                } else {
                    $select_start_min .= "<option value='$m'>" . sprintf('%02d', $m) . "</option>\n";
Severity: Minor
Found in class/APCal.php and 1 other location - About 30 mins to fix
class/APCal.php on lines 3028..3034

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

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

            for ($m = 0; $m < 60; $m += 5) {
                if ($m == $end_min) {
                    $select_end_min .= "<option value='$m' selected>" . sprintf('%02d', $m) . "</option>\n";
                } else {
                    $select_end_min .= "<option value='$m'>" . sprintf('%02d', $m) . "</option>\n";
Severity: Minor
Found in class/APCal.php and 1 other location - About 30 mins to fix
class/APCal.php on lines 3009..3015

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

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