mambax7/smartfaq

View on GitHub

Showing 374 of 649 total issues

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

    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

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

      function ol_content_background(text, picture, hasfullhtml) {
          if (hasfullhtml) {
              txt = text;
          } else {
              txt = '<table width="' + o3_width + '" border="0" cellpadding="0" cellspacing="0" height="' + o3_height + '"><tr><td colspan="3" height="' + o3_padyt + '"></td></tr><tr><td width="' + o3_padxl + '"></td><td valign="TOP" width="' + (o3_width - o3_padxl - o3_padxr) + (o3_textfontclass ? '" class="' + o3_textfontclass : '') + '">' + (o3_textfontclass ? '' : wrapStr(0, o3_textsize, 'text')) + text + (o3_textfontclass ? '' : wrapStr(1, o3_textsize)) + '</td><td width="' + o3_padxr + '"></td></tr><tr><td colspan="3" height="' + o3_padyb + '"></td></tr></table>';
      Severity: Minor
      Found in assets/js/overlib/mini/overlib_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

                      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

        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/mini/overlib_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

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

        function hideObject(obj) {
            runHook("hideObject", FBEFORE);
        
            var theObj = (olNs4 ? obj : obj.style);
            if (olNs6 && olShowId > 0) {
        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

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

        function opt_FUNCTION(callme) {
            o3_text = (callme ? (typeof callme == 'string' ? (/.+\(.*\)/.test(callme) ? eval(callme) : callme) : callme()) : (o3_function ? o3_function() : 'No Function'));
        
            return 0;
        }
        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

                            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

                          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 (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 (/anonymous/.test(fN[i])) continue;
              Severity: Major
              Found in assets/js/overlib/overlib.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/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 (srcList.options[i].text == destList.options[count].text) {
                                          found = true;
                                          break;
                                      }
                  Severity: Major
                  Found in admin/funcs.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

                    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

                      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

                        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

                          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

                            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

                            Severity
                            Category
                            Status
                            Source
                            Language