XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

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

    hs.Outline.prototype = {
        preloadGraphic: function () {
            var src = hs.graphicsDir + (hs.outlinesDir || "outlines/") + this.outlineType + ".png";

            var appendTo = hs.safari && hs.uaVersion < 525 ? hs.container : null;
Severity: Major
Found in assets/images/js/highslide/highslide-with-gallery.js and 3 other locations - About 1 wk to fix
assets/images/js/highslide/highslide-full.js on lines 1149..1240
assets/images/js/highslide/highslide-with-html.js on lines 962..1053
assets/images/js/highslide/highslide.js on lines 796..887

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

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

        public function rrule_extract($event_id)
        {
            $yrs = $GLOBALS['xoopsDB']->query("SELECT *,TO_DAYS(end_date)-TO_DAYS(start_date) AS date_diff FROM $this->table WHERE id='$event_id'");
            if ($GLOBALS['xoopsDB']->getRowsNum($yrs) < 1) {
                return;
Severity: Minor
Found in class/APCal.php - About 1 wk 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

File highslide-with-gallery.js has 2384 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Name:    Highslide JS
 * Version: 4.1.13 (2011-10-06)
 * Config:  default +slideshow +positioning +transitions +viewport +thumbstrip
 * Author:  Torstein Hønsi
Severity: Major
Found in assets/images/js/highslide/highslide-with-gallery.js - About 6 days to fix

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

        hs.Slideshow.prototype = {
            getControls: function () {
                this.controls = hs.createElement('div', {innerHTML: hs.replaceLang(hs.skin.controls)},
                    null, hs.container);
    
    
    Severity: Major
    Found in assets/images/js/highslide/highslide-with-gallery.js and 1 other location - About 6 days to fix
    assets/images/js/highslide/highslide-full.js on lines 3114..3201

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

    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

        hs.Slideshow.prototype = {
            getControls: function () {
                this.controls = hs.createElement('div', {innerHTML: hs.replaceLang(hs.skin.controls)},
                    null, hs.container);
    
    
    Severity: Major
    Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 6 days to fix
    assets/images/js/highslide/highslide-with-gallery.js on lines 2408..2495

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

    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

        hs.Ajax.prototype = {
            run: function () {
                var xhr;
                if (!this.src) this.src = hs.getSrc(this.a);
                if (this.src.match('#')) {
    Severity: Major
    Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 6 days to fix
    assets/images/js/highslide/highslide-with-html.js on lines 2397..2494

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

    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

        hs.Ajax.prototype = {
            run: function () {
                var xhr;
                if (!this.src) this.src = hs.getSrc(this.a);
                if (this.src.match('#')) {
    Severity: Major
    Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 6 days to fix
    assets/images/js/highslide/highslide-full.js on lines 3007..3104

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

    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

    File highslide-with-html.js has 2232 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * Name:    Highslide JS
     * Version: 4.1.13 (2011-10-06)
     * Config:  default +inline +ajax +iframe +flash
     * Author:  Torstein Hønsi
    Severity: Major
    Found in assets/images/js/highslide/highslide-with-html.js - About 6 days to fix

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

              positionOverlay: function (overlay) {
                  var p = overlay.position || 'middle center',
                      relToVP = (overlay.relativeTo == 'viewport'),
                      offX = overlay.offsetX,
                      offY = overlay.offsetY;
      Severity: Major
      Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 6 days to fix
      assets/images/js/highslide/highslide-with-gallery.js on lines 2156..2229

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

      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

              positionOverlay: function (overlay) {
                  var p = overlay.position || 'middle center',
                      relToVP = (overlay.relativeTo == 'viewport'),
                      offX = overlay.offsetX,
                      offY = overlay.offsetY;
      Severity: Major
      Found in assets/images/js/highslide/highslide-with-gallery.js and 1 other location - About 6 days to fix
      assets/images/js/highslide/highslide-full.js on lines 2738..2811

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

      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

              justify: function (p, moveOnly) {
                  var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
      
                  if (tgt && tgt.match(/ /)) {
                      tgtArr = tgt.split(' ');
      Severity: Major
      Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 5 days to fix
      assets/images/js/highslide/highslide-with-gallery.js on lines 1403..1462

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

      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

              justify: function (p, moveOnly) {
                  var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
      
                  if (tgt && tgt.match(/ /)) {
                      tgtArr = tgt.split(' ');
      Severity: Major
      Found in assets/images/js/highslide/highslide-with-gallery.js and 1 other location - About 5 days to fix
      assets/images/js/highslide/highslide-full.js on lines 1862..1921

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

      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

      <?php
      
      if( defined('FOR_XOOPS_LANG_CHECKER') || !defined( 'APCAL_MB_APCALLOADED' ) ) {
          define('APCAL_MB_APCALLOADED' , 1 ) ;
      
      
      Severity: Major
      Found in language/german/main.php and 1 other location - About 5 days to fix
      language/english/main.php on lines 1..100

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

      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

      <?php
      
      if (defined('FOR_XOOPS_LANG_CHECKER') || !defined('APCAL_MB_APCALLOADED')) {
          define('APCAL_MB_APCALLOADED', 1);
      
      
      Severity: Major
      Found in language/english/main.php and 1 other location - About 5 days to fix
      language/german/main.php on lines 1..100

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

      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

              showHideElements: function (tagName, visibility) {
                  var els = document.getElementsByTagName(tagName);
                  var prop = tagName == '*' ? 'overflow' : 'visibility';
                  for (var i = 0; i < els.length; i++) {
                      if (prop == 'visibility' || (document.defaultView.getComputedStyle(
      Severity: Major
      Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 5 days to fix
      assets/images/js/highslide/highslide-with-gallery.js on lines 1983..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 851.

      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

              showHideElements: function (tagName, visibility) {
                  var els = document.getElementsByTagName(tagName);
                  var prop = tagName == '*' ? 'overflow' : 'visibility';
                  for (var i = 0; i < els.length; i++) {
                      if (prop == 'visibility' || (document.defaultView.getComputedStyle(
      Severity: Major
      Found in assets/images/js/highslide/highslide-with-gallery.js and 1 other location - About 5 days to fix
      assets/images/js/highslide/highslide-full.js on lines 2488..2532

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

      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

              htmlSizeOperations: function () {
      
                  this.setObjContainerSize(this.innerContent);
      
      
      
      Severity: Major
      Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 5 days to fix
      assets/images/js/highslide/highslide-full.js on lines 1779..1835

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

      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

              htmlSizeOperations: function () {
      
                  this.setObjContainerSize(this.innerContent);
      
      
      
      Severity: Major
      Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 5 days to fix
      assets/images/js/highslide/highslide-with-html.js on lines 1541..1597

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

      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

              positionOverlay: function (overlay) {
                  var p = overlay.position || 'middle center',
                      offX = overlay.offsetX,
                      offY = overlay.offsetY;
                  if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
      Severity: Major
      Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 5 days to fix
      assets/images/js/highslide/highslide.js on lines 1650..1713

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

      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

              positionOverlay: function (overlay) {
                  var p = overlay.position || 'middle center',
                      offX = overlay.offsetX,
                      offY = overlay.offsetY;
                  if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
      Severity: Major
      Found in assets/images/js/highslide/highslide.js and 1 other location - About 5 days to fix
      assets/images/js/highslide/highslide-with-html.js on lines 2160..2223

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

      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