Showing 540 of 47,256 total issues
Function navigate
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function navigate(direction) {
// Check if any of the menu items is selected
if(jQuery("#suggestions ul li .itemhover").size() == 0) {
currentSelection = -1;
}
- 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 xoopsSmilies
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function xoopsSmilies($textarea_id)
{
icms_core_Debug::setDeprecated('icms_form_elements_Dhtmltextarea.', sprintf(_CORE_REMOVE_IN_VERSION, '2.0'));
$smiles =& icms_core_DataFilter::getSmileys();
if (empty($smileys)) {
- 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 getDirList
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function getDirList($dirname) {
$dirlist = array();
if (is_dir($dirname) && $handle = opendir($dirname)) {
while (false !== ($file = readdir($handle))) {
if (substr( $file, 0, 1 ) != '.' && strtolower($file) != 'cvs') {
- 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 xoops_getcss
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function xoops_getcss($theme = '')
{
if($theme == '') {$theme = $GLOBALS['icmsConfig']['theme_set'];}
$uagent = xoops_getenv('HTTP_USER_AGENT');
if(stristr($uagent, 'mac')) {$str_css = 'styleMAC.css';}
- 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 getSystemHandlersList
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function getSystemHandlersList($checkIfItIsAvaibleOnCurrentSystem = TRUE) {
static $ret = NULL;
if ($ret === NULL) {
$files = glob($this->getSystemHandlerFileName('*'));
$ret = FALSE;
- 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 report
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function report() {
$commands = array( 'create', 'insert', 'alter', 'drop' );
$content = '<ul class="log">';
foreach ( $commands as $cmd) {
if (!@empty( $this->s_tables[$cmd] )) {
- 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 bigumbrella_outputcheck
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function bigumbrella_outputcheck($s) {
if (defined('BIGUMBRELLA_DISABLED')) return $s;
if (function_exists('headers_list')) {
foreach (headers_list() as $header) {
- 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 check_sql_isolatedcommentin
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function check_sql_isolatedcommentin($sanitize = true) {
if ($this->_done_isocom)
return $this->_safe_isocom;
else
$this->_done_isocom = true;
- 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 _initial_recursive
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function _initial_recursive($val, $key) {
if (is_array($val)) {
foreach ($val as $subkey => $subval) {
// check bad globals
if (in_array($subkey, $this->_bad_globals, true)) {
- 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 imanager_addcat
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function imanager_addcat() {
/* because we're using a function, the GET/POST variables are not in scope */
global $imgcat_pid, $imgcat_name, $imgcat_maxsize;
global $imgcat_maxwidth, $imgcat_maxheight, $imgcat_display;
global $imgcat_weight, $imgcat_storetype, $imgcat_foldername;
- 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 b_system_comments_show
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function b_system_comments_show($options) {
$block = array();
include_once ICMS_ROOT_PATH . '/include/comment_constants.php';
$comment_handler = icms::handler('icms_data_comment');
$criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('com_status', XOOPS_COMMENT_ACTIVE));
- 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 apply_profile
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function apply_profile()
{
$xoopsDB = $GLOBALS['xoopsDB'];
// Restore users table
$xoopsDB->queryF(
Function cookie
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.cookie = function(name, value, options) {
if (typeof value != 'undefined') { // name and value given, set cookie
options = options || {};
if (value === null) {
value = '';
Method ip_match
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ip_match($ips) {
foreach ($ips as $ip => $info) {
if ($ip) {
switch (substr($ip, -1)) {
case '.':
Function xoopsCodeCode
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoopsCodeCode(id, enterCodePhrase, enterCodeLangPhrase, CodeLangTypePhrase, errorCodeLangPhrase){
if (enterCodePhrase == null) {
enterCodePhrase = "Enter the codes that you want to add.";
}
var text = prompt(enterCodePhrase, "");
Function addMethods
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addMethods(methods) {
if (arguments.length === 0) addFormMethods();
if (arguments.length === 2) {
var tagName = methods;
Method editblock
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editblock($bid = 0, $clone = FALSE) {
global $icms_block_handler, $icmsAdminTpl;
$blockObj = $icms_block_handler->get($bid);
Consider simplifying this complex logical expression. Open
} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
diff = cache[1];
} else {
while ( (node = ++nodeIndex && node && node[ dir ] ||
Consider simplifying this complex logical expression. Open
if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
submit !== false && (!submit || key == submit) && (submitted = true)))) {
result = accumulator(result, key, value);
}
Function xoopsValidate
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoopsValidate(subjectId, textareaId, submitId, plzCompletePhrase, msgTooLongPhrase, allowedCharPhrase, currCharPhrase) {
var maxchars = 65535;
var subjectDom = xoopsGetElementById(subjectId);
var textareaDom = xoopsGetElementById(textareaId);
var submitDom = xoopsGetElementById(submitId);