mambax7/smartfaq

View on GitHub

Showing 374 of 649 total issues

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

function ol_content_caption_cssstyle(text, title, close) {
    var nameId;
    closing = "";
    closeevent = "onMouseOver";
    if (o3_closeclick == 1) closeevent = (o3_closetitle ? "title='" + o3_closetitle + "'" : "") + " onClick";
Severity: Minor
Found in assets/js/overlib/mini/overlib_cssstyle_mini.js - 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

Avoid deeply nested control flow statements.
Open

                    if (typeof ar[i + 1] != 'number') v = ar[++i];
Severity: Major
Found in assets/js/overlib/mini/overlib_mini.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        while ((l = fN[i].search(/\)[;\s]+/)) != -1) {
                            fn = fN[i].substring(0, l + 1);
                            fN[i] = fN[i].substring(l + 2);
                            if (olre.test(fn)) eval(fn);
                        }
    Severity: Major
    Found in assets/js/overlib/mini/overlib_mini.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                      for (var j = 0; j < fnRef.length; j++) if (hookPt[i] == fnRef[j]) {
                          match = true;
                          break;
                      }
      Severity: Major
      Found in assets/js/overlib/mini/overlib_mini.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if (placeX < 0) placeX = 0;
        Severity: Major
        Found in assets/js/overlib/mini/overlib_anchor_mini.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if (/anonymous/.test(fN[i])) continue;
          Severity: Major
          Found in assets/js/overlib/mini/overlib_mini.js - About 45 mins to fix

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

            function set_background(pic) {
                if (pic == "") {
                    if (olNs4) {
                        over.background.src = null;
                    } else if (over.style) {
            Severity: Minor
            Found in assets/js/overlib/overlib.js - 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

            Avoid deeply nested control flow statements.
            Open

                            for (var j = 0; j < fnRef.length; j++) if (hookPt[i] == fnRef[j]) {
                                match = true;
                                break;
                            }
            Severity: Major
            Found in assets/js/overlib/overlib.js - About 45 mins to fix

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

                      $limit = 0,
                      $start = 0,
                      $categoryid = -1,
                      $sort = 'datesub',
                      $order = 'DESC',
              Severity: Minor
              Found in class/FaqHandler.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    while ((l = fN[i].search(/\)[;\s]+/)) != -1) {
                                        fn = fN[i].substring(0, l + 1);
                                        fN[i] = fN[i].substring(l + 2);
                                        if (olre.test(fn)) eval(fn);
                                    }
                Severity: Major
                Found in assets/js/overlib/overlib.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if (placeX < 0) placeX = 0;
                  Severity: Major
                  Found in assets/js/overlib/overlib_anchor.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                if (last == 'number') hookPt.alt[pms[optPm - 1 - pmStart]] = fnRef;
                    Severity: Major
                    Found in assets/js/overlib/overlib.js - About 45 mins to fix

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

                      function ol_content_caption_cssstyle(text, title, close) {
                          var nameId;
                          closing = "";
                          closeevent = "onMouseOver";
                      
                      
                      Severity: Minor
                      Found in assets/js/overlib/overlib_cssstyle.js - 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

                      Avoid deeply nested control flow statements.
                      Open

                                          if (/anonymous/.test(fN[i])) continue;
                      Severity: Major
                      Found in assets/js/overlib/overlib.js - About 45 mins to fix

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

                        function ol_content_background_cssstyle(text, picture, hasfullhtml) {
                            if (hasfullhtml) {
                                txt = text;
                            } else {
                                var pU, hU, wU;
                        Severity: Minor
                        Found in assets/js/overlib/overlib_cssstyle.js - 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 displayCategory has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function displayCategory($categoryObj, $level = 0): void
                        {
                            global $xoopsModule, $categoryHandler, $pathIcon16;
                            $description = $categoryObj->description();
                            if (!XOOPS_USE_MULTIBYTES) {
                        Severity: Minor
                        Found in admin/category.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 sf_displayTarea has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            function &sf_displayTarea(&$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1)
                        Severity: Minor
                        Found in include/functions.render.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                          if (hookPt[j] == order[i]) {
                                              match = true;
                                              break;
                                          }
                          Severity: Major
                          Found in assets/js/overlib/overlib.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                            for (var i = 0; i < fnRef.length; i++) if (hookPt[j] == fnRef[i]) {
                                                match = true;
                                                break;
                                            }
                            Severity: Major
                            Found in assets/js/overlib/overlib.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  if (srcList.options[i].text == destList.options[count].text) {
                                                      found = true;
                                                      break;
                                                  }
                              Severity: Major
                              Found in admin/funcs.js - About 45 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language