mambax7/extcal

View on GitHub

Showing 691 of 1,163 total issues

Function getSearchEvents has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

    public function getSearchEvents(
        $year = 0,
        $month = 0,
        $day = 0,
        $cat = 0,
Severity: Minor
Found in class/EventHandler.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 checkVerModule has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

    public static function checkVerModule($helper, $source = 'github', $default = 'master')
    {
        $moduleDirName      = \basename(\dirname(__DIR__, 2));
        $moduleDirNameUpper = mb_strtoupper($moduleDirName);
        $update             = '';
Severity: Minor
Found in class/Common/VersionChecks.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 PclTarDelete has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarDelete($p_tarname, $p_filelist, $p_mode = '')
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarDelete', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
        $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 PclTarUpdate has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarUpdate($p_tarname, $p_filelist, $p_mode = '', $p_add_dir = '', $p_remove_dir = '')
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarUpdate', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
        $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 PclTarExtractIndex has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarExtractIndex($p_tarname, $p_index, $p_path = './', $p_remove_path = '', $p_mode = '')
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarExtractIndex', "tar=$p_tarname, index='$p_index', path=$p_path, remove_path='$p_remove_path', mode='$p_mode'");
        $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

Method PclTarHandleExtractByIndex has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function PclTarHandleExtractByIndex(
        $p_tar,
        &$p_index_current,
        $p_index_start,
        $p_index_stop,
Severity: Major
Found in class/pcltar.lib.php - About 2 hrs to fix

    Method TrDisplay has 72 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Calendar_Engine_PearDate has 25 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Calendar_Engine_PearDate /* implements Calendar_Engine_Interface */
      {
          /**
           * Makes sure a given timestamp is only ever parsed once
           * Uses a static variable to prevent date() being used twice
      Severity: Minor
      Found in class/pear/Calendar/Engine/PearDate.php - About 2 hrs to fix

        Method PclTarHandleAddList has 69 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function PclTarHandleAddList($p_tar, $p_list, $p_mode, &$p_list_detail, $p_add_dir, $p_remove_dir)
            {
                TrFctStart(__FILE__, __LINE__, 'PclTarHandleAddList', "tar='$p_tar', list, mode='$p_mode', add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
                $v_result = 1;
                $v_header = [];
        Severity: Major
        Found in class/pcltar.lib.php - About 2 hrs to fix

          Function wrapperMouseHandler has a Cognitive Complexity of 20 (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-full.js - About 2 hrs to fix

          Cognitive Complexity

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

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

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

          Further reading

          Function updateAnchors has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
          Open

                  updateAnchors: function () {
                      var el, els, all = [], images = [], groups = {}, re;
          
                      for (var i = 0; i < hs.openerTagNames.length; i++) {
                          els = document.getElementsByTagName(hs.openerTagNames[i]);
          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 contentLoaded has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
          Open

                  contentLoaded: function () {
                      try {
                          if (!this.content) return;
                          this.content.onload = null;
                          if (this.onLoadStarted) return;
          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 updateAnchors has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
          Open

                  updateAnchors: function () {
                      var el, els, all = [], images = [], groups = {}, re;
          
                      for (var i = 0; i < hs.openerTagNames.length; i++) {
                          els = document.getElementsByTagName(hs.openerTagNames[i]);
          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 getOverlays has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
          Open

                  getOverlays: function () {
                      this.getInline(['heading', 'caption'], true);
                      this.getNumber();
                      if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
                      if (hs.showCredits) this.writeCredits();
          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 positionOverlay has a Cognitive Complexity of 20 (exceeds 5 allowed). 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: 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 isBlockCloned has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
          Open

              function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
              {
                  xoops_loadLanguage('admin', 'system');
                  xoops_loadLanguage('admin/blocksadmin', 'system');
                  xoops_loadLanguage('admin/groups', 'system');
          Severity: Minor
          Found in admin/blocksadmin.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 convertResultSet has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
          Open

              public function convertResultSet($result, $idAsKey = false, $asObject = true)
              {
                  $ret = [];
                  while (false !== ($myrow = $this->db->fetchArray($result))) {
                      $obj = $this->create(false);
          Severity: Minor
          Found in class/ExtcalPersistableObjectHandler.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

          File Time.php has 281 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          namespace XoopsModules\Extcal;
          
          use XoopsModules\Extcal\{Helper
          Severity: Minor
          Found in class/Time.php - About 2 hrs to fix

            File Calendar.php has 280 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
            
            /**
            Severity: Minor
            Found in class/pear/Calendar/Calendar.php - About 2 hrs to fix

              Method getSearchEvents has 67 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getSearchEvents(
                      $year = 0,
                      $month = 0,
                      $day = 0,
                      $cat = 0,
              Severity: Major
              Found in class/EventHandler.php - About 2 hrs to fix
                Severity
                Category
                Status
                Source
                Language