Showing 540 of 47,256 total issues
Function icms_currency
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function icms_currency($var, $currencyObj=false)
{
$ret = icms_getfloat($var, array('single_dot_as_decimal'=> TRUE));
$ret = round($ret, 2);
// make sure we have at least .00 in the $var
- 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 apply_templates
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function apply_templates() {
$db = $GLOBALS['xoopsDB'];
$table = $db->prefix('tplfile');
$table1 = $db->prefix('tplsource');
$tpl_files = 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
Function load_invite_code
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function load_invite_code($code) {
// validate if code is of valid length.
if (empty($code) || strlen($code) != 8) {
header('Location: invite.php');
// redirect_header('invite.php', 0, _US_INVITENONE);
- 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_getConfig
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function icms_getConfig($key, $moduleName = false, $default = 'default_is_undefined')
{
if(!$moduleName) {$moduleName = icms_getCurrentModuleName();}
$configs = icms_getModuleConfig($moduleName);
if(isset($configs[$key])) {return $configs[$key];}
- 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_cp_footer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function icms_cp_footer() {
global $xoopsOption, $xoTheme;
icms::$logger->stopTime('Module display');
if (!headers_sent()) {
- 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_module_gettemplate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function &xoops_module_gettemplate($dirname, $template, $block=false) {
$ret = '';
if ($block) {
$path = ICMS_ROOT_PATH.'/modules/'.$dirname.'/templates/blocks/'.$template;
} else {
- 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 extract_post_recursive
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function extract_post_recursive($key_name, $tmp_array) {
$table = '';
$form = '';
foreach ($tmp_array as $key => $val) {
if (is_array($val)) {
- 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_module_gettemplate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function &xoops_module_gettemplate($dirname, $template, $block = FALSE) {
global $icmsConfig;
$ret = '';
if ($block) {
$path = ICMS_MODULES_PATH . '/' . $dirname . '/templates/blocks/' . $template;
- 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 getErrors
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function getErrors($ashtml = true) {
if ($ashtml) {
$ret = '';
foreach ($this->_errors as $msg) {
$ret .= "$msg<br />\n";
- 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 query
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function query($sql, $limit = 0, $start = 0) {
$sql4check = substr($sql, 7);
foreach ($this->doubtful_needles as $needle) {
if (stristr($sql4check, $needle)) {
$this->checkSql($sql);
- 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_brute_force
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function check_brute_force() {
$ip4sql = filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP);
$uri4sql = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_STRING);
if (empty($ip4sql) || $ip4sql == '') 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 getIntervalForDisplay
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getIntervalForDisplay() {
$int = $this->getVar('sat_interval');
$day = (int) ($int / 60 / 24);
$hou = (int) (($int - $day * 24 * 60) / 60);
- 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 getModulesArray
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getModulesArray($full = FALSE) {
if (!is_array($this->modules_name)) {
$icms_module_handler = icms::handler('icms_module');
$installed_modules = $icms_module_handler->getObjects();
$this->modules_name[0]['name'] = _NONE;
- 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 setPage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function setPage($page): string {
/**
* If server is PHP 4, display the php4 page and stop the install
*/
if ($this->no_php5 && $page != 'no_php5') {
- 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_check_recursive
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function _bigumbrella_check_recursive($val) {
if (is_array($val)) {
foreach ($val as $subval) {
$this->_bigumbrella_check_recursive($subval);
}
- 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 isMobile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function isMobile() {
if (class_exists('Wizin_User')) {
// WizMobile (gusagi)
$user = &Wizin_User::getSingleton();
return $user->bIsMobile;
- 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 render
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function render() {
$myts = icms_core_Textsanitizer::getInstance();
if (!$this->content) {
switch ($this->getVar('customtag_type')) {
case ICMS_CUSTOMTAG_TYPE_XCODES:
- 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_delfileok
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function imanager_delfileok($image_id, $redir = NULL) {
global $target, $type;
if (!icms::$security->check()) {
redirect_header('browser.php?op=list&target=' . $target . '&type=' . $type, 3, implode('<br />', icms::$security->getErrors()));
}
- 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_delfileok
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function imanager_delfileok($image_id, $redir = NULL) {
if (!icms::$security->check()) {
redirect_header('admin.php?fct=images', 3, implode('<br />', icms::$security->getErrors()));
}
- 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 editrating
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function editrating($showmenu = FALSE, $ratingid = 0) {
global $icms_rating_handler, $icmsAdminTpl, $op, $changedField;
icms_cp_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"