XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

Function awake has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

        awake: function () {
            try {

                hs.expanders[this.key] = this;

Severity: Minor
Found in assets/images/js/highslide/highslide-full.js - About 1 hr 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 calcExpanded has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

        calcExpanded: function () {
            var exp = this.exp;
            this.justify = 'auto';

            // get alignment
Severity: Minor
Found in assets/images/js/highslide/highslide-full.js - About 1 hr 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 getPosition has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

        getPosition: function (el) {
            if (/area/i.test(el.tagName)) {
                var imgs = document.getElementsByTagName('img');
                for (var i = 0; i < imgs.length; i++) {
                    var u = imgs[i].useMap;
Severity: Minor
Found in assets/images/js/highslide/highslide-full.js - About 1 hr 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 calcExpanded has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

        calcExpanded: function () {
            var exp = this.exp;
            this.justify = 'auto';

            // get alignment
Severity: Minor
Found in assets/images/js/highslide/highslide-with-gallery.js - About 1 hr 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 expand has a Cognitive Complexity of 15 (exceeds 5 allowed). 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;
            if (type == 'html') {
                for (var i = 0; i < hs.sleeping.length; i++) {
Severity: Minor
Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr 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 htmlPrepareClose has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

        htmlPrepareClose: function () {
            if (hs.geckoMac) { // bad redraws
                if (!hs.mask) hs.mask = hs.createElement('div', null,
                    {position: 'absolute'}, hs.container);
                hs.setStyles(hs.mask, {
Severity: Minor
Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr 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 init has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

        init: function () {
            if (!hs.container) {

                hs.ieLt7 = hs.ie && hs.uaVersion < 7;
                hs.ieLt9 = hs.ie && hs.uaVersion < 9;
Severity: Minor
Found in assets/images/js/highslide/highslide-with-gallery.js - About 1 hr 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 render has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    public function render($currentoption = 1, $display = true)
    {
        global $modversion;
        $_dirname = $this->_obj->getVar('dirname');
        $i        = 0;
Severity: Minor
Found in class/adminMenu.php - About 1 hr 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 Sepia has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    public function Sepia(&$gdimg, $amount, $targetColor)
    {
        $amount      = (is_numeric($amount) ? max(0, min(100, $amount)) : 50);
        $amountPct   = $amount / 100;
        $targetColor = (phpthumb_functions::IsHexColor($targetColor) ? $targetColor : 'A28065');
Severity: Minor
Found in thumbs/phpthumb.filters.php - About 1 hr 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 GetAllFilesInSubfolders has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    public static function GetAllFilesInSubfolders($dirname)
    {
        $AllFiles = array();
        $dirname  = rtrim(realpath($dirname), '/\\');
        if ($dirhandle = @opendir($dirname)) {
Severity: Minor
Found in thumbs/phpthumb.functions.php - About 1 hr 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

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

        doShowHide: function (visibility) {
            if (hs.hideSelects) this.showHideElements('SELECT', visibility);
            if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
            if (hs.geckoMac) this.showHideElements('*', visibility);
        },
Severity: Major
Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 1 hr to fix
assets/images/js/highslide/highslide-with-gallery.js on lines 1978..1982
assets/images/js/highslide/highslide-with-html.js on lines 1923..1927
assets/images/js/highslide/highslide.js on lines 1483..1487

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

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

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

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

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

Refactorings

Further Reading

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

        doShowHide: function (visibility) {
            if (hs.hideSelects) this.showHideElements('SELECT', visibility);
            if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
            if (hs.geckoMac) this.showHideElements('*', visibility);
        },
Severity: Major
Found in assets/images/js/highslide/highslide-with-html.js and 3 other locations - About 1 hr to fix
assets/images/js/highslide/highslide-full.js on lines 2483..2487
assets/images/js/highslide/highslide-with-gallery.js on lines 1978..1982
assets/images/js/highslide/highslide.js on lines 1483..1487

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

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

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

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

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

Refactorings

Further Reading

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

        doShowHide: function (visibility) {
            if (hs.hideSelects) this.showHideElements('SELECT', visibility);
            if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
            if (hs.geckoMac) this.showHideElements('*', visibility);
        },
Severity: Major
Found in assets/images/js/highslide/highslide-with-gallery.js and 3 other locations - About 1 hr to fix
assets/images/js/highslide/highslide-full.js on lines 2483..2487
assets/images/js/highslide/highslide-with-html.js on lines 1923..1927
assets/images/js/highslide/highslide.js on lines 1483..1487

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

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

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

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

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

Refactorings

Further Reading

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

        doShowHide: function (visibility) {
            if (hs.hideSelects) this.showHideElements('SELECT', visibility);
            if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
            if (hs.geckoMac) this.showHideElements('*', visibility);
        },
Severity: Major
Found in assets/images/js/highslide/highslide.js and 3 other locations - About 1 hr to fix
assets/images/js/highslide/highslide-full.js on lines 2483..2487
assets/images/js/highslide/highslide-with-gallery.js on lines 1978..1982
assets/images/js/highslide/highslide-with-html.js on lines 1923..1927

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

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

            if (this.isHtml && this.preserveContent) {
                this.overlayBox.style.top = '-9999px';
                hs.container.appendChild(this.overlayBox);
            } else
                hs.discardElement(this.overlayBox);
Severity: Major
Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 1 hr to fix
assets/images/js/highslide/highslide-with-html.js on lines 2320..2324

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

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

            if (this.isHtml && this.preserveContent) {
                this.overlayBox.style.top = '-9999px';
                hs.container.appendChild(this.overlayBox);
            } else
                hs.discardElement(this.overlayBox);
Severity: Major
Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 1 hr to fix
assets/images/js/highslide/highslide-full.js on lines 2919..2923

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

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 tableMouseUp has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Calendar.tableMouseUp = function (ev) {
    var cal = Calendar._C;
    if (!cal) {
        return false;
    }
Severity: Minor
Found in assets/js/jscalendar/calendar.js - About 1 hr to fix

    Function hideShowCovered has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Calendar.prototype.hideShowCovered = function () {
        if (!Calendar.is_ie && !Calendar.is_opera)
            return;
        function getVisib(obj) {
            var value = obj.style.visibility;
    Severity: Minor
    Found in assets/js/jscalendar/calendar.js - About 1 hr to fix

      Function justify has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              justify: function (p, moveOnly) {
                  var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
      
                  if (tgt && tgt.match(/ /)) {
                      tgtArr = tgt.split(' ');
      Severity: Minor
      Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix

        Function htmlSizeOperations has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                htmlSizeOperations: function () {
        
                    this.setObjContainerSize(this.innerContent);
        
        
        
        Severity: Minor
        Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix
          Severity
          Category
          Status
          Source
          Language