mambax7/extcal

View on GitHub

Showing 1,163 of 1,163 total issues

Function PclTarHandlerDirCheck has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarHandlerDirCheck($p_dir)
    {
        $v_result = 1;

        TrFctStart(__FILE__, __LINE__, 'PclTarHandlerDirCheck', (string)$p_dir);
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 PclTarAddList has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarAddList($p_tarname, $p_filelist, $p_add_dir = '', $p_remove_dir = '', $p_mode = '')
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarAddList', "tar=$p_tarname, file=$p_filelist, p_add_dir='$p_add_dir', p_remove_dir='$p_remove_dir', mode=$p_mode");
        $v_result      = 1;
        $p_list_detail = [];
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

Method render has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function render()
    {
        $sSpinFolder = $this->getFolder();
        $sFolderImg  = "{$sSpinFolder}/images/{$this->getImgFolder()}/";

Severity: Major
Found in class/Form/Spin/FormSpin.php - About 2 hrs to fix

    Method getRecurRules has 52 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getRecurRules($parm)
        {
            //Utility::echoArray($parm);exit;
    
            // If this isn't a reccuring event
    Severity: Major
    Found in class/EventHandler.php - About 2 hrs to fix

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

              reOrder: function () {
                  for (var i = 0; i < hs.expanders.length; i++)
                      if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
              },
      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 709..712
      assets/js/highslide.js on lines 401..404

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

      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

          hs.fx = function (elem, options, prop) {
              this.options = options;
              this.elem = elem;
              this.prop = prop;
      
      
      Severity: Major
      Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
      assets/js/highslide-full.js on lines 1017..1023
      assets/js/highslide-with-gallery.js on lines 837..843

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

      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

              reOrder: function () {
                  for (var i = 0; i < hs.expanders.length; i++)
                      if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
              },
      Severity: Major
      Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
      assets/js/highslide-full.js on lines 709..712
      assets/js/highslide-with-gallery.js on lines 565..568

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

      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

          hs.fx = function (elem, options, prop) {
              this.options = options;
              this.elem = elem;
              this.prop = prop;
      
      
      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 1017..1023
      assets/js/highslide.js on lines 664..670

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

      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

              reOrder: function () {
                  for (var i = 0; i < hs.expanders.length; i++)
                      if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
              },
      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 565..568
      assets/js/highslide.js on lines 401..404

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

      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

          hs.fx = function (elem, options, prop) {
              this.options = options;
              this.elem = elem;
              this.prop = prop;
      
      
      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 837..843
      assets/js/highslide.js on lines 664..670

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

      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_remove_path) && (0 === mb_strpos($v_header['filename'], $p_remove_path))) {
                          TrFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file " . $v_header['filename'] . '');
                          // ----- Remove the path
                          $v_header['filename'] = mb_substr($v_header['filename'], $p_remove_path_size);
                          TrFctMessage(__FILE__, __LINE__, 3, 'Reslting file is ' . $v_header['filename'] . '');
      Severity: Major
      Found in class/pcltar.lib.php and 1 other location - About 2 hrs to fix
      class/pcltar.lib.php on lines 2562..2567

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

      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_remove_path) && (0 === mb_strpos($v_header['filename'], $p_remove_path))) {
                  TrFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file " . $v_header['filename'] . '');
                  // ----- Remove the path
                  $v_header['filename'] = mb_substr($v_header['filename'], $p_remove_path_size);
                  TrFctMessage(__FILE__, __LINE__, 3, 'Resulting file is ' . $v_header['filename'] . '');
      Severity: Major
      Found in class/pcltar.lib.php and 1 other location - About 2 hrs to fix
      class/pcltar.lib.php on lines 2049..2054

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

      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 51 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-with-gallery.js - About 2 hrs to fix

        Function mouseClickHandler has 51 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.js - About 2 hrs to fix

          Method getEventsRecurents has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getEventsRecurents($criteres)
              {
                  //        while (list($k, $v) = each($criteres)) {
                  foreach ($criteres as $k => $v) {
                      ${$k} = $v;
          Severity: Major
          Found in class/EventHandler.php - About 2 hrs to fix

            Function changeSize has 50 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: Minor
            Found in assets/js/highslide.js - About 2 hrs to fix

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

                              hs.setStyles(this.wrapper, {
                                  left: (x.tpos + x.tb - x.cb) + 'px',
                                  top: (y.tpos + x.tb - y.cb) + 'px'
                              });
              Severity: Major
              Found in assets/js/highslide-with-gallery.js and 3 other locations - About 2 hrs to fix
              assets/js/highslide-full.js on lines 1631..1634
              assets/js/highslide-full.js on lines 2064..2067
              assets/js/highslide.js on lines 1158..1161

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

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

                              hs.setStyles(this.wrapper, {
                                  left: (x.tpos + x.tb - x.cb) + 'px',
                                  top: (y.tpos + x.tb - y.cb) + 'px'
                              });
              Severity: Major
              Found in assets/js/highslide.js and 3 other locations - About 2 hrs to fix
              assets/js/highslide-full.js on lines 1631..1634
              assets/js/highslide-full.js on lines 2064..2067
              assets/js/highslide-with-gallery.js on lines 1354..1357

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

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

                              hs.setStyles(this.wrapper, {
                                  left: (x.tpos - x.cb + x.tb) + 'px',
                                  top: (y.tpos - y.cb + y.tb) + 'px'
                              });
              Severity: Major
              Found in assets/js/highslide-full.js and 3 other locations - About 2 hrs to fix
              assets/js/highslide-full.js on lines 1631..1634
              assets/js/highslide-with-gallery.js on lines 1354..1357
              assets/js/highslide.js on lines 1158..1161

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

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

                              hs.setStyles(this.wrapper, {
                                  left: (x.tpos + x.tb - x.cb) + 'px',
                                  top: (y.tpos + x.tb - y.cb) + 'px'
                              });
              Severity: Major
              Found in assets/js/highslide-full.js and 3 other locations - About 2 hrs to fix
              assets/js/highslide-full.js on lines 2064..2067
              assets/js/highslide-with-gallery.js on lines 1354..1357
              assets/js/highslide.js on lines 1158..1161

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

              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