mambax7/extcal

View on GitHub

Showing 691 of 1,163 total issues

Method setFragments has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function setFragments($y, $m = null, $d = null, $h = null, $i = null, $s = null)
Severity: Minor
Found in class/pear/Calendar/Decorator/Uri.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if ('/' === mb_substr($v_header['filename'], mb_strlen($p_file_list[$i]), 1)) {
                                TrFctMessage(__FILE__, __LINE__, 3, '' . $v_header['filename'] . " is a file in $p_file_list[$i]");
                                $v_delete_file = true;
                            }
    Severity: Major
    Found in class/pcltar.lib.php - About 45 mins to fix

      Method PclTarHandleUpdate has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          function PclTarHandleUpdate($p_tarname, $p_file_list, &$p_list_detail, $p_tar_mode, $p_add_dir, $p_remove_dir)
      Severity: Minor
      Found in class/pcltar.lib.php - About 45 mins to fix

        Function addCatSelectCriteria has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

            public function addCatSelectCriteria($criteria, $cats = null)
            {
                if (!\is_array($cats) && $cats > 0) {
                    $criteria->add(new \Criteria('cat_id', $cats));
                }
        Severity: Minor
        Found in class/EventHandler.php - About 45 mins 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 PclTarHandleAppend has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            function PclTarHandleAppend($p_tarname, $p_list, $p_mode, &$p_list_detail, $p_add_dir, $p_remove_dir)
        Severity: Minor
        Found in class/pcltar.lib.php - About 45 mins to fix

          Method getSearchEvent has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function getSearchEvent($queryarray, $andor, $limit, $offset, $userId, $user)
          Severity: Minor
          Found in class/EventHandler.php - About 45 mins to fix

            Method PclTarHandleAddList has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                function PclTarHandleAddList($p_tar, $p_list, $p_mode, &$p_list_detail, $p_add_dir, $p_remove_dir)
            Severity: Minor
            Found in class/pcltar.lib.php - About 45 mins to fix

              Method PclTarHandleExtractByIndexList has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      $p_tarname,
                      $p_index_string,
                      &$p_list_detail,
                      $p_path,
                      $p_remove_path,
              Severity: Minor
              Found in class/pcltar.lib.php - About 45 mins to fix

                Function PclTarHandleExtension has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    function PclTarHandleExtension($p_tarname)
                    {
                        TrFctStart(__FILE__, __LINE__, 'PclTarHandleExtension', "tar=$p_tarname");
                
                        // ----- Look for file extension
                Severity: Minor
                Found in class/pcltar.lib.php - About 45 mins 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 PclTarHandleAddFile has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    function PclTarHandleAddFile($p_tar, $p_filename, $p_mode, &$p_header, $p_add_dir, $p_remove_dir)
                Severity: Minor
                Found in class/pcltar.lib.php - About 45 mins to fix

                  Function getSearchEvent2 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getSearchEvent2($year, $month, $day, $cat, $searchExp, $andor, $orderBy)
                      {
                          global $xoopsDB, $xoopsUser;
                  
                          if (isset($xoopsUser)) {
                  Severity: Minor
                  Found in class/EventHandler.php - About 45 mins 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 updateAll has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function updateAll($fieldname, $fieldvalue, \CriteriaElement $criteria = null, $force = false)
                      {
                          $setClause = $fieldname . ' = ';
                          if (\is_numeric($fieldvalue)) {
                              $setClause .= $fieldvalue;
                  Severity: Minor
                  Found in class/ExtcalPersistableObjectHandler.php - About 45 mins 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

                  Consider simplifying this complex logical expression.
                  Open

                                  if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
                                      || (sg && sg === this.slideshowGroup)) {
                                      this.createOverlay(o);
                                  }
                  Severity: Major
                  Found in assets/js/highslide-with-gallery.js - About 40 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                                    if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
                                        || (sg && sg === this.slideshowGroup)) {
                                        this.createOverlay(o);
                                    }
                    Severity: Major
                    Found in assets/js/highslide.js - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                                      if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
                                          || (sg && sg === this.slideshowGroup)) {
                                          if (this.isImage || (this.isHtml && o.useOnHtml))
                                              this.createOverlay(o);
                                      }
                      Severity: Major
                      Found in assets/js/highslide-full.js - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                                        if (($stamp1 >= $event['start'] && $stamp1 < $event['end'])
                                            || ($stamp2 >= $event['start']
                                                && $stamp2 < $event['end'])
                                            || ($stamp1 <= $event['start'] && $stamp2 > $event['end'])) {
                                            $this->children[$i]->addEntry($event);
                        Severity: Major
                        Found in class/pear/Calendar/docs/examples/20.php - About 40 mins to fix

                          Function setPosition has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  setPosition: function (pos, offset, vis, dur, easing) {
                          Severity: Minor
                          Found in assets/js/highslide-full.js - About 35 mins to fix

                            Function createElement has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    createElement: function (tag, attribs, styles, parent, nopad) {
                            Severity: Minor
                            Found in assets/js/highslide-full.js - About 35 mins to fix

                              Function createElement has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      createElement: function (tag, attribs, styles, parent, nopad) {
                              Severity: Minor
                              Found in assets/js/highslide-with-gallery.js - About 35 mins to fix

                                Function setPosition has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        setPosition: function (pos, offset, vis, dur, easing) {
                                Severity: Minor
                                Found in assets/js/highslide.js - About 35 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language