XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

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

        expand: function (a, params, custom, type) {
            if (!a) a = hs.createElement('a', null, {display: 'none'}, hs.container);
            if (typeof a.getParams == 'function') return params;
            try {
                new hs.Expander(a, params, custom);
Severity: Major
Found in assets/images/js/highslide/highslide-with-gallery.js and 1 other location - About 3 hrs to fix
assets/images/js/highslide/highslide.js on lines 218..227

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

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

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

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

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

Refactorings

Further Reading

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

        expand: function (a, params, custom, type) {
            if (!a) a = hs.createElement('a', null, {display: 'none'}, hs.container);
            if (typeof a.getParams == 'function') return params;
            try {
                new hs.Expander(a, params, custom);
Severity: Major
Found in assets/images/js/highslide/highslide.js and 1 other location - About 3 hrs to fix
assets/images/js/highslide/highslide-with-gallery.js on lines 283..292

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

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

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

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

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

Refactorings

Further Reading

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

        sleep: function () {
            if (this.outline) this.outline.table.style.display = 'none';
            this.releaseMask = null;
            this.wrapper.style.display = 'none';
            this.isExpanded = false;
Severity: Major
Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 3 hrs to fix
assets/images/js/highslide/highslide-with-html.js on lines 2083..2089

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

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

            var trans = this.transitions,
                other = up ? (this.last ? this.last.a : null) : hs.upcoming,
                t = (trans[1] && other
                && hs.getParam(other, 'transitions')[1] == trans[1]) ?
                    trans[1] : trans[0];
Severity: Major
Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 3 hrs to fix
assets/images/js/highslide/highslide-with-gallery.js on lines 1554..1558

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

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

            var trans = this.transitions,
                other = up ? (this.last ? this.last.a : null) : hs.upcoming,
                t = (trans[1] && other
                && hs.getParam(other, 'transitions')[1] == trans[1]) ?
                    trans[1] : trans[0];
Severity: Major
Found in assets/images/js/highslide/highslide-with-gallery.js and 1 other location - About 3 hrs to fix
assets/images/js/highslide/highslide-full.js on lines 2023..2027

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

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

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

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

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

Refactorings

Further Reading

Method get_blockarray_date_event has 78 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public function get_blockarray_date_event($get_target = '')
        {
            // if( $get_target == '' ) $get_target = $_SERVER['SCRIPT_NAME'] ;

            // ������׻����Ĥġ�WHERE��δ�֤˴ؤ���������
Severity: Major
Found in class/APCal_xoops.php - About 3 hrs to fix

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

                        for ($j = 0; $j < $opcount; ++$j) {
                            $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value');
                            $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name');
                            $ele->addOption($optval, $optkey);
                        }
    Severity: Major
    Found in include/preferences.inc.php and 1 other location - About 3 hrs to fix
    include/preferences.inc.php on lines 111..115

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

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

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

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

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

    Refactorings

    Further Reading

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

                        for ($j = 0; $j < $opcount; ++$j) {
                            $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value');
                            $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name');
                            $ele->addOption($optval, $optkey);
                        }
    Severity: Major
    Found in include/preferences.inc.php and 1 other location - About 3 hrs to fix
    include/preferences.inc.php on lines 101..105

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

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

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

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

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

    Refactorings

    Further Reading

    Function correctRatio has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

            correctRatio: function (ratio) {
                var x = this.x,
                    y = this.y,
                    changed = false,
                    xSize = Math.min(x.full, x.size),
    Severity: Minor
    Found in assets/images/js/highslide/highslide-full.js - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function initSlideshow has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

            initSlideshow: function () {
                if (!this.last) {
                    for (var i = 0; i < hs.slideshows.length; i++) {
                        var ss = hs.slideshows[i], sg = ss.slideshowGroup;
                        if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup)
    Severity: Minor
    Found in assets/images/js/highslide/highslide-full.js - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function correctRatio has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

            correctRatio: function (ratio) {
                var x = this.x,
                    y = this.y,
                    changed = false,
                    xSize = Math.min(x.full, x.size),
    Severity: Minor
    Found in assets/images/js/highslide/highslide-with-gallery.js - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function initSlideshow has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

            initSlideshow: function () {
                if (!this.last) {
                    for (var i = 0; i < hs.slideshows.length; i++) {
                        var ss = hs.slideshows[i], sg = ss.slideshowGroup;
                        if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup)
    Severity: Minor
    Found in assets/images/js/highslide/highslide-with-gallery.js - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function correctRatio has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

            correctRatio: function (ratio) {
                var x = this.x,
                    y = this.y,
                    changed = false,
                    xSize = Math.min(x.full, x.size),
    Severity: Minor
    Found in assets/images/js/highslide/highslide.js - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function correctRatio has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

            correctRatio: function (ratio) {
                var x = this.x,
                    y = this.y,
                    changed = false,
                    xSize = Math.min(x.full, x.size),
    Severity: Minor
    Found in assets/images/js/highslide/highslide-with-html.js - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function get_sql_set has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

            public function get_sql_set($cols)
            {
                $ret = '';
    
                foreach ($cols as $col => $types) {
    Severity: Minor
    Found in class/APCal.php - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function convertmycontacts has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

    function convertmycontacts($strcontact)
    {
        // Ermitteln aller einzelnen Wörter von Kontakt aus Termin piCal
        // Umwandeln der einzelnen Namen in Link auf Benutzerkonto, wenn Name ein Mitgliedsname ist
        $strsearch    = ' ';
    Severity: Minor
    Found in include/ro_contacthandler.php - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function applyUnsharpMask has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function applyUnsharpMask(&$img, $amount, $radius, $threshold)
        {
    
            // $img is an image that is already created within php using
            // imgcreatetruecolor. No url! $img must be a truecolor image.
    Severity: Minor
    Found in thumbs/phpthumb.unsharp.php - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method makeShort has 77 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            public function makeShort($str)
            {
                $replacements = array(
                    'Ä' => 'Ae',
                    'Ü' => 'Ue',
    Severity: Major
    Found in class/APCal.php - About 3 hrs to fix

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

                  var overlay = hs.createElement(
                      'div', {
                          id: 'hsId' + hs.idCounter++,
                          hsId: o.hsId
                      }, {
      Severity: Major
      Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 3 hrs to fix
      assets/images/js/highslide/highslide-with-gallery.js on lines 2123..2136

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

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

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

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

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

      Refactorings

      Further Reading

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

                  var overlay = hs.createElement(
                      'div', {
                          id: 'hsId' + hs.idCounter++,
                          hsId: o.hsId
                      }, {
      Severity: Major
      Found in assets/images/js/highslide/highslide-with-gallery.js and 1 other location - About 3 hrs to fix
      assets/images/js/highslide/highslide-full.js on lines 2705..2718

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

      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