Showing 47,251 of 47,256 total issues
Avoid deeply nested control flow statements. Open
nodes[i].id = id + "-" + (tree.length - 1) + "-section"; var box1 = document.getElementById(id + "-" + (tree.length - 1)); var box2 = document.getElementById(nodes[i].id); var el = new Element(box1.id); if (el.level == 1) { if (this.type == "horizontal") { box2.style.top = (box1.offsetTop + box1.offsetHeight + this.position.level1.top) + "px"; if (this.browser.ie5) { box2.style.left = (this.position.level1.left) + "px";} else {
/* Start open menu from right_to_left - added by stranger @ www.impresscms.ir , Script & Original hack are made by irmtfan (www.jadoogaran.org) */
box2.style.Right = ( box1.offsetLeft + this.position.level1.left) + "px";}
Avoid deeply nested control flow statements. Open
if ( elem && elem.parentNode ) {
if ( elem.id === m ) {
results.push( elem );
return results;
}
Avoid deeply nested control flow statements. Open
if ( Expr.relative[ tokens[j].type ] ) {
break;
}
Avoid deeply nested control flow statements. Open
if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
contains( context, elem ) && elem.id === m ) {
results.push( elem );
return results;
}
Function $
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function $() {
var elements = new Array();
for (var i = 0; i < arguments.length; i++) {
var element = arguments[i];
- 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 ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
return true;
}
Function addItem
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function addItem(itemurl, name, target, cat, url, type) {
Function isApplied
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function isApplied() {
if (!isset($_SESSION[__CLASS__]) || !is_array($_SESSION[__CLASS__])) {
$_SESSION[__CLASS__] = array();
}
foreach ($this->tasks as $task) {
- 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 isApplied
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function isApplied()
{
if (!isset($_SESSION[__CLASS__]) || !is_array($_SESSION[__CLASS__])) {
$_SESSION[__CLASS__] = array();
}
- 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 ($template != '') {
$tplfile =& $tplfile_handler->find('default', 'block', $fblock['bid']);
if (count($tplfile) == 0) {
$tplfile_new =& $tplfile_handler->create();
$tplfile_new->setVar('tpl_module', $dirname);
Avoid deeply nested control flow statements. Open
if (false != $comments) {
$renderer =& icms_data_comment_Renderer::instance($xoopsTpl);
$renderer->setComments($comments);
$renderer->renderThreadView($top_comments[$i]->getVar('com_id'), $admin_view);
}
Method xoFormFieldCollation
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function xoFormFieldCollation($name, $value, $label, $link, $charset, $help = '') {
Avoid deeply nested control flow statements. Open
if (!preg_match("/^http[s]*:\/\//i", $results[$i]['link'])) {
$results[$i]['link'] = "modules/" . $module->getVar('dirname') . "/" . $results[$i]['link'];
}
Function icms_get_base_domain
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function icms_get_base_domain($url)
{
$debug = 0;
$base_domain = '';
- 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 icms_getModuleName
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function icms_getModuleName($withLink = true, $forBreadCrumb = false, $moduleName = false) {
if (!$moduleName) {
$moduleName = icms::$module->getVar('dirname');
}
//$icmsModule = icms_getModuleInfo($moduleName);
- 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($poster_id != 0) {$deleted_num[$poster_id] = !isset($deleted_num[$poster_id]) ? 1 : ($deleted_num[$poster_id] + 1);}
Avoid deeply nested control flow statements. Open
while ($row = fetch_assoc($result)) {
$character_sets[$row["Variable_name"]] = $row["Value"];
}
Function xoopsCodeTarea
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function xoopsCodeTarea($textarea_id, $cols=60, $rows=15, $suffix=null)
{
icms_core_Debug::setDeprecated('icms_form_elements_Dhtmltextarea.', sprintf(_CORE_REMOVE_IN_VERSION, '2.0'));
$hiddentext = isset($suffix) ? 'xoopsHiddenText'.trim($suffix) : 'xoopsHiddenText';
//Hack for url, email ...., the anchor is for having a link on [_More...]
- 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 xoFormBlockCollation
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function xoFormBlockCollation($name, $value, $label, $link, $charset, $help = '') {
Avoid deeply nested control flow statements. Open
if (empty($newbid)) {
$newbid = $db->getInsertId();
}