mambax7/extcal

View on GitHub

Showing 1,163 of 1,163 total issues

Function step has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

        step: function (gotoEnd) {
            var t = (new Date()).getTime();
            if (gotoEnd || t >= this.options.duration + this.startTime) {
                this.now = this.end;
                this.pos = this.state = 1;
Severity: Minor
Found in assets/js/highslide.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 wrapperMouseHandler has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

        wrapperMouseHandler: function (e) {
            try {
                if (!e) e = window.event;
                var over = /mouseover/i.test(e.type);
                if (!e.target) e.target = e.srcElement; // ie
Severity: Minor
Found in assets/js/highslide.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 step has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

        step: function (gotoEnd) {
            var t = (new Date()).getTime();
            if (gotoEnd || t >= this.options.duration + this.startTime) {
                this.now = this.end;
                this.pos = this.state = 1;
Severity: Minor
Found in assets/js/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 dragHandler has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

        dragHandler: function (e) {
            if (!hs.dragArgs) return true;
            if (!e) e = window.event;
            var a = hs.dragArgs, exp = a.exp;

Severity: Minor
Found in assets/js/highslide.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 dragHandler has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

        dragHandler: function (e) {
            if (!hs.dragArgs) return true;
            if (!e) e = window.event;
            var a = hs.dragArgs, exp = a.exp;

Severity: Minor
Found in assets/js/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 wrapperMouseHandler has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

        wrapperMouseHandler: function (e) {
            try {
                if (!e) e = window.event;
                var over = /mouseover/i.test(e.type);
                if (!e.target) e.target = e.srcElement; // ie
Severity: Minor
Found in assets/js/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 extcal_getDefautminicalOption has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

function extcal_getDefautminicalOption(&$options)
{
    // 0|0|150|225|1|3|10|0|1|1,2|| |120|120
    for ($h = 0; $h <= 13; ++$h) {
        if (!isset($options[$h])) {
Severity: Minor
Found in blocks/minical.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 deleteDirectory has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    public static function deleteDirectory($src)
    {
        // Only continue if user is a 'global' Admin
        if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
            return false;
Severity: Minor
Found in class/Common/FilesManagement.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 PclTarHandleReadHeader has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarHandleReadHeader($v_binary_data, &$v_header)
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarHandleReadHeader', '');
        $v_result = 1;

Severity: Minor
Found in class/pcltar.lib.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 contentLoaded has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        contentLoaded: function () {
            try {
                if (!this.content) return;
                this.content.onload = null;
                if (this.onLoadStarted) return;
Severity: Major
Found in assets/js/highslide-with-gallery.js - About 2 hrs to fix

    Method getSearchEvent3 has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getSearchEvent3(
            $queryarray,
            $andor,
            $limit,
            $offset,
    Severity: Major
    Found in class/EventHandler.php - About 2 hrs to fix

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

              setPos: function (i) {
                  this.pos = i;
                  this.exp.wrapper.style[this.lt] = i + 'px';
      
                  if (this.exp.outline) this.exp.outline.setPosition();
      Severity: Major
      Found in assets/js/highslide-full.js and 2 other locations - About 2 hrs to fix
      assets/js/highslide-with-gallery.js on lines 1158..1164
      assets/js/highslide.js on lines 973..979

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

      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 3 locations. Consider refactoring.
      Open

              setPos: function (i) {
                  this.pos = i;
                  this.exp.wrapper.style[this.lt] = i + 'px';
      
                  if (this.exp.outline) this.exp.outline.setPosition();
      Severity: Major
      Found in assets/js/highslide-with-gallery.js and 2 other locations - About 2 hrs to fix
      assets/js/highslide-full.js on lines 1352..1358
      assets/js/highslide.js on lines 973..979

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

      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 3 locations. Consider refactoring.
      Open

              setPos: function (i) {
                  this.pos = i;
                  this.exp.wrapper.style[this.lt] = i + 'px';
      
                  if (this.exp.outline) this.exp.outline.setPosition();
      Severity: Major
      Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
      assets/js/highslide-full.js on lines 1352..1358
      assets/js/highslide-with-gallery.js on lines 1158..1164

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

      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 3 locations. Consider refactoring.
      Open

                          if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
                              this.createFullExpand();
                              if (this.overlays.length == 1) this.sizeOverlayBox();
                          }
      Severity: Major
      Found in assets/js/highslide-full.js and 2 other locations - About 2 hrs to fix
      assets/js/highslide-with-gallery.js on lines 1391..1394
      assets/js/highslide.js on lines 1175..1178

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

      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 3 locations. Consider refactoring.
      Open

                          if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
                              this.createFullExpand();
                              if (this.overlays.length == 1) this.sizeOverlayBox();
                          }
      Severity: Major
      Found in assets/js/highslide-with-gallery.js and 2 other locations - About 2 hrs to fix
      assets/js/highslide-full.js on lines 1671..1674
      assets/js/highslide.js on lines 1175..1178

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

      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 3 locations. Consider refactoring.
      Open

                          if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
                              this.createFullExpand();
                              if (this.overlays.length == 1) this.sizeOverlayBox();
                          }
      Severity: Major
      Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
      assets/js/highslide-full.js on lines 1671..1674
      assets/js/highslide-with-gallery.js on lines 1391..1394

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

      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

              if ('' != $p_message) {
                  $i                                  = count($g_pcl_trace_entries);
                  $g_pcl_trace_entries[$i]['name']    = '';
                  $g_pcl_trace_entries[$i]['param']   = '';
                  $g_pcl_trace_entries[$i]['message'] = $p_message;
      Severity: Major
      Found in class/pcltrace.lib.php and 1 other location - About 2 hrs to fix
      class/pcltrace.lib.php on lines 187..196

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

      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

              if ('' != $p_message) {
                  $i                                  = count($g_pcl_trace_entries);
                  $g_pcl_trace_entries[$i]['name']    = '';
                  $g_pcl_trace_entries[$i]['param']   = '';
                  $g_pcl_trace_entries[$i]['message'] = $p_message;
      Severity: Major
      Found in class/pcltrace.lib.php and 1 other location - About 2 hrs to fix
      class/pcltrace.lib.php on lines 249..258

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

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

              mouseClickHandler: function (e) {
                  if (!e) e = window.event;
                  if (e.button > 1) return true;
                  if (!e.target) e.target = e.srcElement;
      
      
      Severity: Major
      Found in assets/js/highslide-full.js - About 2 hrs to fix
        Severity
        Category
        Status
        Source
        Language