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";
- Read upRead up
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];
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);
}
Avoid deeply nested control flow statements. Open
for (var j = 0; j < fnRef.length; j++) if (hookPt[i] == fnRef[j]) {
match = true;
break;
}
Avoid deeply nested control flow statements. Open
if (placeX < 0) placeX = 0;
Avoid deeply nested control flow statements. Open
if (/anonymous/.test(fN[i])) continue;
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) {
- Read upRead up
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;
}
Method getAllPublished
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$limit = 0,
$start = 0,
$categoryid = -1,
$sort = 'datesub',
$order = 'DESC',
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);
}
Avoid deeply nested control flow statements. Open
if (placeX < 0) placeX = 0;
Avoid deeply nested control flow statements. Open
if (last == 'number') hookPt.alt[pms[optPm - 1 - pmStart]] = fnRef;
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";
- Read upRead up
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;
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;
- Read upRead up
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) {
- Read upRead up
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)
Avoid deeply nested control flow statements. Open
if (hookPt[j] == order[i]) {
match = true;
break;
}
Avoid deeply nested control flow statements. Open
for (var i = 0; i < fnRef.length; i++) if (hookPt[j] == fnRef[i]) {
match = true;
break;
}
Avoid deeply nested control flow statements. Open
if (srcList.options[i].text == destList.options[count].text) {
found = true;
break;
}