XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

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

                                        case 2:
                                            // delta - The 2 bytes following the escape contain unsigned values
                                            // indicating the horizontal and vertical offsets of the next pixel
                                            // from the current position.
                                            $colincrement = $this->LittleEndian2Int(substr($BMPpixelData, $pixeldataoffset++, 1));
Severity: Major
Found in thumbs/phpthumb.bmp.php and 1 other location - About 2 hrs to fix
thumbs/phpthumb.bmp.php on lines 539..548

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

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

function myblocksadmin_update_block(
    $bid,
    $bside,
    $bweight,
    $bvisible,
Severity: Major
Found in include/blocksadmin.inc.php - About 2 hrs to fix

    Method _shiftBoundaries has 65 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function _shiftBoundaries($lines, &$changed, $other_changed)
        {
            $i = 0;
            $j = 0;
    
    
    Severity: Major
    Found in include/Text_Diff.php - About 2 hrs to fix

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

                  var after = up ?
                      function () {
      
                          if (exp.outline) exp.outline.table.style.visibility = "visible";
                          setTimeout(function () {
      Severity: Major
      Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 2 hrs to fix
      assets/images/js/highslide/highslide-with-gallery.js on lines 1578..1588
      assets/images/js/highslide/highslide-with-html.js on lines 1743..1753
      assets/images/js/highslide/highslide.js on lines 1330..1340

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

      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

                  var after = up ?
                      function () {
      
                          if (exp.outline) exp.outline.table.style.visibility = "visible";
                          setTimeout(function () {
      Severity: Major
      Found in assets/images/js/highslide/highslide.js and 3 other locations - About 2 hrs to fix
      assets/images/js/highslide/highslide-full.js on lines 2048..2058
      assets/images/js/highslide/highslide-with-gallery.js on lines 1578..1588
      assets/images/js/highslide/highslide-with-html.js on lines 1743..1753

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

      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 (var n in names) {
                      this[n] = names[n].content.cloneNode(1);
                      hs.setStyles(this[n], {
                          position: 'absolute',
                          border: 0,
      Severity: Major
      Found in assets/images/js/highslide/highslide-with-gallery.js and 1 other location - About 2 hrs to fix
      assets/images/js/highslide/highslide-full.js on lines 2183..2191

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

      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 (up) {
                      this.wrapper.style.visibility = 'visible';
                      this.content.style.visibility = 'visible';
                      if (this.isHtml) this.innerContent.style.visibility = 'visible';
                      this.a.className += ' highslide-active-anchor';
      Severity: Major
      Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 2 hrs to fix
      assets/images/js/highslide/highslide-full.js on lines 2096..2101

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

      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

              for (var i = 0; i < hs.overrides.length; i++) {
                  var name = hs.overrides[i];
                  this[name] = params && typeof params[name] != 'undefined' ?
                      params[name] : hs[name];
              }
      Severity: Major
      Found in assets/images/js/highslide/highslide.js and 3 other locations - About 2 hrs to fix
      assets/images/js/highslide/highslide-full.js on lines 1381..1385
      assets/images/js/highslide/highslide-with-gallery.js on lines 1186..1190
      assets/images/js/highslide/highslide-with-html.js on lines 1180..1184

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

      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

              for (var i = 0; i < hs.overrides.length; i++) {
                  var name = hs.overrides[i];
                  this[name] = params && typeof params[name] != 'undefined' ?
                      params[name] : hs[name];
              }
      Severity: Major
      Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 2 hrs to fix
      assets/images/js/highslide/highslide-with-gallery.js on lines 1186..1190
      assets/images/js/highslide/highslide-with-html.js on lines 1180..1184
      assets/images/js/highslide/highslide.js on lines 999..1003

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

      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

              for (var i = 0; i < hs.overrides.length; i++) {
                  var name = hs.overrides[i];
                  this[name] = params && typeof params[name] != 'undefined' ?
                      params[name] : hs[name];
              }
      Severity: Major
      Found in assets/images/js/highslide/highslide-with-html.js and 3 other locations - About 2 hrs to fix
      assets/images/js/highslide/highslide-full.js on lines 1381..1385
      assets/images/js/highslide/highslide-with-gallery.js on lines 1186..1190
      assets/images/js/highslide/highslide.js on lines 999..1003

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

      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

                  var after = up ?
                      function () {
      
                          if (exp.outline) exp.outline.table.style.visibility = "visible";
                          setTimeout(function () {
      Severity: Major
      Found in assets/images/js/highslide/highslide-with-gallery.js and 3 other locations - About 2 hrs to fix
      assets/images/js/highslide/highslide-full.js on lines 2048..2058
      assets/images/js/highslide/highslide-with-html.js on lines 1743..1753
      assets/images/js/highslide/highslide.js on lines 1330..1340

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

      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

                  var after = up ?
                      function () {
      
                          if (exp.outline) exp.outline.table.style.visibility = "visible";
                          setTimeout(function () {
      Severity: Major
      Found in assets/images/js/highslide/highslide-with-html.js and 3 other locations - About 2 hrs to fix
      assets/images/js/highslide/highslide-full.js on lines 2048..2058
      assets/images/js/highslide/highslide-with-gallery.js on lines 1578..1588
      assets/images/js/highslide/highslide.js on lines 1330..1340

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

      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 (up) {
                      this.wrapper.style.visibility = 'visible';
                      this.content.style.visibility = 'visible';
                      if (this.isHtml) this.innerContent.style.visibility = 'visible';
                      this.a.className += ' highslide-active-anchor';
      Severity: Major
      Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 2 hrs to fix
      assets/images/js/highslide/highslide-with-html.js on lines 1791..1796

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

      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 (var n in names) {
                      this[n] = names[n].content.cloneNode(1);
                      hs.setStyles(this[n], {
                          position: 'absolute',
                          border: 0,
      Severity: Major
      Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 2 hrs to fix
      assets/images/js/highslide/highslide-with-gallery.js on lines 1700..1708

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

      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

              for (var i = 0; i < hs.overrides.length; i++) {
                  var name = hs.overrides[i];
                  this[name] = params && typeof params[name] != 'undefined' ?
                      params[name] : hs[name];
              }
      Severity: Major
      Found in assets/images/js/highslide/highslide-with-gallery.js and 3 other locations - About 2 hrs to fix
      assets/images/js/highslide/highslide-full.js on lines 1381..1385
      assets/images/js/highslide/highslide-with-html.js on lines 1180..1184
      assets/images/js/highslide/highslide.js on lines 999..1003

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

      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 fade has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

              fade: function (up, to) {
                  this.outlineWhileAnimating = false;
                  var exp = this, t = up ? hs.expandDuration : 0;
      
                  if (up) {
      Severity: Minor
      Found in assets/images/js/highslide/highslide-full.js - About 2 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 fade has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

              fade: function (up, to) {
                  this.outlineWhileAnimating = false;
                  var exp = this, t = up ? hs.expandDuration : 0;
      
                  if (up) {
      Severity: Minor
      Found in assets/images/js/highslide/highslide-with-gallery.js - About 2 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 ApplyMask has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

          public function ApplyMask(&$gdimg_mask, &$gdimg_image)
          {
              if (phpthumb_functions::gd_version() < 2) {
                  $this->DebugMessage('Skipping ApplyMask() because gd_version is "' . phpthumb_functions::gd_version() . '"', __FILE__, __LINE__);
      
      
      Severity: Minor
      Found in thumbs/phpthumb.filters.php - About 2 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 changeSize has 64 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              changeSize: function (up, to, dur) {
      
                  if (this.outline && !this.outlineWhileAnimating) {
                      if (up) this.outline.setPosition();
                      else this.outline.destroy(
      Severity: Major
      Found in assets/images/js/highslide/highslide-with-html.js - About 2 hrs to fix

        Method _diag has 64 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function _diag($xoff, $xlim, $yoff, $ylim, $nchunks)
            {
                $flip = false;
        
                if ($xlim - $xoff > $ylim - $yoff) {
        Severity: Major
        Found in include/Text_Diff.php - About 2 hrs to fix
          Severity
          Category
          Status
          Source
          Language