Showing 540 of 47,256 total issues
Consider simplifying this complex logical expression. Open
if (element && isPercentage) {
context = context || element.parentNode;
var decimal = toDecimal(value), whole = null;
var isHorizontal = property.include('left') || property.include('right') ||
Consider simplifying this complex logical expression. Open
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
support.getById && context.nodeType === 9 && documentIsHTML &&
Expr.relative[ tokens[1].type ] ) {
context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
Consider simplifying this complex logical expression. Open
if (element === document.body) {
var bodyScrollNode = document.documentElement || document.body.parentNode || document.body;
valueT += !Object.isUndefined(window.pageYOffset) ? window.pageYOffset : bodyScrollNode.scrollTop || 0;
valueL += !Object.isUndefined(window.pageXOffset) ? window.pageXOffset : bodyScrollNode.scrollLeft || 0;
break;
Method make_data
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
function make_data(&$dbm, &$cm, $adminname, $adminlogin_name, $adminpass, $adminmail, $language, $gruops) {
Consider simplifying this complex logical expression. Open
if (!isset($yname) || trim($yname) == '' || $ymail == ''
|| !isset($fname) || trim($fname) == ''
|| !isset($fmail) || trim($fmail) == '') {
redirect_header(ICMS_URL.'/misc.php?action=showpopups&type=friend&op=sendform',2,_MSC_NEEDINFO);
}
Consider simplifying this complex logical expression. Open
if (isset($infoarr[3]) && trim($infoarr[3]) == 'blocks') {
$default =& $tpltpl_handler->find('default', 'block', NULL, trim($infoarr[2]), trim($infoarr[4]));
} elseif ((!isset($infoarr[4]) || trim($infoarr[4]) == '') && $infoarr[1] == 'templates') {
$default =& $tpltpl_handler->find('default', 'module', NULL, trim($infoarr[2]), trim($infoarr[3]));
} elseif ($infoarr[1] == "templates" && $infoarr[2] == "system" && $infoarr[3] == "admin") {
Function Selector
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Prototype.Selector = (function() {
function select() {
throw new Error('Method "Prototype.Selector.select" must be defined.');
}
- 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 appendCode
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function appendCode(addCode,target) {
var targetDom = window.opener.xoopsGetElementById(target);
if (targetDom.createTextRange && targetDom.caretPos){
var caretPos = targetDom.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 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 Hash
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
var Hash = Class.create(Enumerable, (function() {
function initialize(object) {
this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
}
- 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_getImageSize
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function icms_getImageSize($url, & $width, & $height) {
if (empty ($width) || empty ($height)) {
if (!$dimension = @ getimagesize($url)) {
return 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 StopXSS
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function StopXSS($text)
{
if(!is_array($text))
{
$text = preg_replace("/\(\)/si", "", $text);
- 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 xoFormFieldCollation
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function xoFormFieldCollation($name, $value, $label, $link, $charset, $help = '') {
if (version_compare(getDBVersion($link), "4.1.0", "lt")) {
return "";
}
if (empty ($charset) || !$collations = getDbCollations($link, $charset)) {
- 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 imcms_get_base_domain
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function imcms_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 checkAccess
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function checkAccess(): bool {
if (INSTALL_USER && INSTALL_PASSWORD) {
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="ImpressCMS Installer"');
header('HTTP/1.0 401 Unauthorized');
- 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 readPost
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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 editcustomtag
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function editcustomtag($customtagid = 0, $clone = FALSE) {
global $icms_customtag_handler, $icmsAdminTpl, $customtagid;
icms_cp_header();
$customtagObj = $icms_customtag_handler->get($customtagid);
- 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 output_log
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function output_log($type = 'UNKNOWN', $uid = 0, $unique_check = false, $level = 1) {
if ($this->_logged) return true;
if (!($this->_conf['log_level'] & $level)) return 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 getDeleteItemLink
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getDeleteItemLink($onlyUrl = FALSE, $withimage = TRUE, $userSide = FALSE) {
$ret = ICMS_URL . "/modules/system/admin.php?fct=blocksadmin&op=del&" . $this->handler->keyName . "=" . $this->getVar($this->handler->keyName);
if ($onlyUrl) {
if ($this->getVar('block_type') != 'C' && $this->getVar('block_type') != 'K') {
return "";
- 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 readConstant
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function readConstant() {
if (defined('XOOPS_DB_TYPE'))
$this->database = XOOPS_DB_TYPE;
if (defined('XOOPS_DB_HOST'))
$this->dbhost = XOOPS_DB_HOST;
- 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 xoopsValidate
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function xoopsValidate(subjectId, textareaId, submitId, plzCompletePhrase, msgTooLongPhrase, allowedCharPhrase, currCharPhrase) {