mambax7/extcal

View on GitHub

Showing 1,163 of 1,163 total issues

Function spinSetValue has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

function spinSetValue(prefixe, prefixe2, suffixe, newValue, delai, newImg) {
Severity: Minor
Found in class/Form/Spin/js/spin.js - About 45 mins to fix

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

        function setOrder($bid, $title, $weight, $visible, $side, $bcachetime)
    Severity: Minor
    Found in admin/blocksadmin.php - About 45 mins to fix

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

      function bExtcalMinicalAddEventToArray($event, &$eventsArray, $timeHandler, $startMonth, $endMonth, $cats)
      Severity: Minor
      Found in blocks/minical.php - About 45 mins to fix

        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

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

              public function adjustDate(&$y, &$m, &$d, &$h, &$i, &$s)
          Severity: Minor
          Found in class/pear/Calendar/Engine/PearDate.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 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

                  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

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

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

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

                                  isHsAnchor: function (a) {
                                      return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/));
                                  },
                          Severity: Major
                          Found in assets/js/highslide-with-gallery.js and 2 other locations - About 45 mins to fix
                          assets/js/highslide-full.js on lines 705..707
                          assets/js/highslide.js on lines 397..399

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

                          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

                                  isHsAnchor: function (a) {
                                      return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/));
                                  },
                          Severity: Major
                          Found in assets/js/highslide-full.js and 2 other locations - About 45 mins to fix
                          assets/js/highslide-with-gallery.js on lines 561..563
                          assets/js/highslide.js on lines 397..399

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

                          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

                                  isHsAnchor: function (a) {
                                      return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/));
                                  },
                          Severity: Major
                          Found in assets/js/highslide.js and 2 other locations - About 45 mins to fix
                          assets/js/highslide-full.js on lines 705..707
                          assets/js/highslide-with-gallery.js on lines 561..563

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

                          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

                              public function getCalendarCriteriaCompo($start, $end, $cat = 0, $user = null)
                              {
                                  $criteriaCompo = $this->getCriteriaCompo($start, $end, $cat, $user);
                                  if (!Helper::getInstance()->getConfig('diplay_past_event_cal')) {
                                      $criteriaCompo->add(new \Criteria('event_end', \time(), '>'));
                          Severity: Minor
                          Found in class/EventHandler.php and 1 other location - About 45 mins to fix
                          class/EventHandler.php on lines 692..700

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

                          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