ImpressCMS/impresscms

View on GitHub

Showing 540 of 47,256 total issues

Avoid too many return statements within this method.
Open

        return $ret;
Severity: Major
Found in htdocs/modules/system/admin/modulesadmin/modulesadmin.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            return "<p>" . sprintf(_MD_AM_OKDEACT, "<strong>" . $module->getVar('name') . "</strong>") . "</p>";
    Severity: Major
    Found in htdocs/modules/system/admin/modulesadmin/modulesadmin.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  return $ret . "</p>";
      Severity: Major
      Found in htdocs/modules/system/admin/modulesadmin/modulesadmin.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                    return true;

          Avoid too many return statements within this method.
          Open

                      return FALSE;
          Severity: Major
          Found in htdocs/modules/system/admin/autotasks/class/autotasks.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return TRUE;
            Severity: Major
            Found in htdocs/modules/system/admin/autotasks/class/autotasks.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return true;

                Avoid too many return statements within this method.
                Open

                                    return true;

                  Avoid too many return statements within this method.
                  Open

                                      return TRUE;
                  Severity: Major
                  Found in htdocs/modules/system/admin/autotasks/class/autotasks.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                            return $s;

                      Avoid too many return statements within this method.
                      Open

                                  return false;

                        Avoid too many return statements within this method.
                        Open

                                return "<a href='" . $ret . "'>" . $this->getVar($this->handler->identifierName) . "</a>";
                        Severity: Major
                        Found in htdocs/modules/system/admin/blocksadmin/class/blocksadmin.php - About 30 mins to fix

                          Function getInputs has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              getInputs: function(form, typeName, name) {
                                  form = $(form);
                                  var inputs = form.getElementsByTagName('input');
                          
                                  if (!typeName && !name) return $A(inputs).map(Element.extend);
                          Severity: Minor
                          Found in htdocs/install/prototype.js - About 25 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 TCGenerateSafe has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function TCGenerateSafe() {
                              var s = '';
                              for (j = 0; j < 12; j ++) {
                                  s += "<tr>";
                                  for (k = 0; k < 3; k ++)
                          Severity: Minor
                          Found in htdocs/include/color-picker.js - About 25 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 apply_auth_db has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              function apply_auth_db() {
                                  $db = $GLOBALS['xoopsDB'];
                          
                                  $cat = getDbValue( $db, 'configcategory', 'confcat_id', "`confcat_name` ='_MD_AM_AUTHENTICATION'" );
                                  if ($cat !== false && $cat != XOOPS_CONF_AUTH) {
                          Severity: Minor
                          Found in upgrade/upd-2.0.13-to-2.0.14/index.php - About 25 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 initialize has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              initialize: function(request){
                                  this.request = request;
                                  var transport  = this.transport  = request.transport,
                                      readyState = this.readyState = transport.readyState;
                          
                          
                          Severity: Minor
                          Found in htdocs/install/prototype.js - About 25 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 filter_preview has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function filter_preview(id,xurl,img,width,height){
                              var filter = xoopsGetElementById('filter'+id).value;
                              var arg1 = xoopsGetElementById(id+'arg1').value;
                              var arg2 = xoopsGetElementById(id+'arg2').value;
                              var arg3 = xoopsGetElementById(id+'arg3').value;
                          Severity: Minor
                          Found in htdocs/modules/system/admin/images/js/imanager.js - About 25 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 TCGenerateWind has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function TCGenerateWind() {
                              var s = '';
                              for (j = 0; j < 12; j ++) {
                                  s += "<tr>";
                                  for (k = 0; k < 3; k ++)
                          Severity: Minor
                          Found in htdocs/include/color-picker.js - About 25 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 ObjectRange has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                          var ObjectRange = Class.create(Enumerable, (function() {
                              function initialize(start, end, exclusive) {
                                  this.start = start;
                                  this.end = end;
                                  this.exclusive = exclusive;
                          Severity: Minor
                          Found in htdocs/install/prototype.js - About 25 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 mod_constant has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              function mod_constant($name)
                              {
                          
                                  if (!empty($GLOBALS["VAR_PREFIXU"]) && @defined($GLOBALS["VAR_PREFIXU"]."_".strtoupper($name))) {
                                      return CONSTANT($GLOBALS["VAR_PREFIXU"]."_".strtoupper($name));
                          Severity: Minor
                          Found in htdocs/include/functions.php - About 25 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

                          Severity
                          Category
                          Status
                          Source
                          Language