mambax7/extcal

View on GitHub

Showing 1,163 of 1,163 total issues

Function PclTarHandleHeader has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarHandleHeader($p_tar, $p_filename, $p_mode, &$p_header, $p_stored_filename)
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarHandleHeader', "tar=$p_tar, file='$p_filename', mode='$p_mode', stored_filename='$p_stored_filename'");
        $v_result = 1;

Severity: Minor
Found in class/pcltar.lib.php - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Function PclTarHandleCreate has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarHandleCreate($p_tarname, $p_list, $p_mode, $p_add_dir = '', $p_remove_dir = '')
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarHandleCreate', "tar=$p_tarname, list, mode=$p_mode, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
        $v_result      = 1;
        $v_list_detail = [];
Severity: Minor
Found in class/pcltar.lib.php - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Function TrDisplay has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    function TrDisplay()
    {
        global $g_pcl_trace_level;
        global $g_pcl_trace_mode;
        global $g_pcl_trace_filename;
Severity: Minor
Found in class/pcltrace.lib.php - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

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

                if (/(Android|iPad|iPhone|iPod)/.test(navigator.userAgent)) {
                    var body = document.body;

                    function pixDimmerSize() {
                        hs.setStyles(hs.dimmer, {
Severity: Major
Found in assets/js/highslide-full.js and 1 other location - About 3 hrs to fix
assets/js/highslide-with-gallery.js on lines 382..394

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

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 (/(Android|iPad|iPhone|iPod)/.test(navigator.userAgent)) {
                    var body = document.body;

                    function pixDimmerSize() {
                        hs.setStyles(hs.dimmer, {
Severity: Major
Found in assets/js/highslide-with-gallery.js and 1 other location - About 3 hrs to fix
assets/js/highslide-full.js on lines 525..537

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

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

    function PclTarHandleAppend($p_tarname, $p_list, $p_mode, &$p_list_detail, $p_add_dir, $p_remove_dir)
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarHandleAppend', "tar=$p_tarname, list, mode=$p_mode");
        $v_result = 1;

Severity: Major
Found in class/pcltar.lib.php - About 3 hrs to fix

    Method getFormatedDate has 81 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getFormatedDate($format, $timestamp)
        {
            $patterns     = [
                '/January/',
                '/February/',
    Severity: Major
    Found in class/Time.php - About 3 hrs to fix

      Method bExtcalMinicalEdit has 80 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function bExtcalMinicalEdit($options)
      {
          //    // require_once  \dirname(__DIR__) . '/class/form/spin/formspin.php';
          global $xoopsUser;
      
      
      Severity: Major
      Found in blocks/minical.php - About 3 hrs to fix

        Method PclTarHandleHeader has 80 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function PclTarHandleHeader($p_tar, $p_filename, $p_mode, &$p_header, $p_stored_filename)
            {
                TrFctStart(__FILE__, __LINE__, 'PclTarHandleHeader', "tar=$p_tar, file='$p_filename', mode='$p_mode', stored_filename='$p_stored_filename'");
                $v_result = 1;
        
        
        Severity: Major
        Found in class/pcltar.lib.php - About 3 hrs to fix

          Function Expander has 79 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              hs.Expander = function (a, params, custom, contentType) {
                  if (document.readyState && hs.ie && !hs.isReady) {
                      hs.addEventListener(document, 'ready', function () {
                          new hs.Expander(a, params, custom, contentType);
                      });
          Severity: Major
          Found in assets/js/highslide-with-gallery.js - About 3 hrs to fix

            Function AC_GetArgs has 79 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function AC_GetArgs(args, ext, srcParamName, classid, mimeType) {
                var ret = new Object();
                ret.embedAttrs = new Object();
                ret.params = new Object();
                ret.objAttrs = new Object();
            Severity: Major
            Found in assets/js/AC_RunActiveContent.js - About 3 hrs to fix

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

                  public function isValidSecond()
                  {
                      $s   = $this->calendar->thisSecond();
                      $min = 0;
                      if ($min > $s) {
              Severity: Major
              Found in class/pear/Calendar/Validator.php and 2 other locations - About 3 hrs to fix
              class/pear/Calendar/Validator.php on lines 199..216
              class/pear/Calendar/Validator.php on lines 223..240

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

              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

                  public function isValidMinute()
                  {
                      $i   = $this->calendar->thisMinute();
                      $min = 0;
                      if ($min > $i) {
              Severity: Major
              Found in class/pear/Calendar/Validator.php and 2 other locations - About 3 hrs to fix
              class/pear/Calendar/Validator.php on lines 199..216
              class/pear/Calendar/Validator.php on lines 247..264

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

              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

                  public function isValidHour()
                  {
                      $h   = $this->calendar->thisHour();
                      $min = 0;
                      if ($min > $h) {
              Severity: Major
              Found in class/pear/Calendar/Validator.php and 2 other locations - About 3 hrs to fix
              class/pear/Calendar/Validator.php on lines 223..240
              class/pear/Calendar/Validator.php on lines 247..264

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

              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

                          for (var i = 0; i < this.overlays.length; i++) {
                              var o = hs.$('hsId' + this.overlays[i]);
                              if (/panel$/.test(o.position)) this.positionOverlay(o);
                              else hs.push(os, o);
                          }
              Severity: Major
              Found in assets/js/highslide-full.js and 2 other locations - About 3 hrs to fix
              assets/js/highslide-with-gallery.js on lines 2244..2248
              assets/js/highslide.js on lines 1727..1731

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 98.

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

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

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

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

              Refactorings

              Further Reading

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

                          for (var i = 0; i < this.overlays.length; i++) {
                              var o = hs.$('hsId' + this.overlays[i]);
                              if (/panel$/.test(o.position)) this.positionOverlay(o);
                              else hs.push(os, o);
                          }
              Severity: Major
              Found in assets/js/highslide.js and 2 other locations - About 3 hrs to fix
              assets/js/highslide-full.js on lines 2829..2833
              assets/js/highslide-with-gallery.js on lines 2244..2248

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 98.

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

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

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

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

              Refactorings

              Further Reading

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

                          for (var i = 0; i < this.overlays.length; i++) {
                              var o = hs.$('hsId' + this.overlays[i]);
                              if (/panel$/.test(o.position)) this.positionOverlay(o);
                              else hs.push(os, o);
                          }
              Severity: Major
              Found in assets/js/highslide-with-gallery.js and 2 other locations - About 3 hrs to fix
              assets/js/highslide-full.js on lines 2829..2833
              assets/js/highslide.js on lines 1727..1731

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 98.

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 98.

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 98.

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 98.

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

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

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

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

              Refactorings

              Further Reading

              Severity
              Category
              Status
              Source
              Language