Showing 540 of 47,256 total issues
Function blocks_engine_upgrade
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function blocks_engine_upgrade() {
echo '<h2>Updating blocks engine </h2>';
if (!$this->table_exists('block_positions')) {
$xoopsDB = $GLOBALS['xoopsDB'];
$query = "CREATE TABLE `" . $xoopsDB->prefix('block_positions') . "` (
- 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_main_show
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function b_system_main_show() {
global $icmsConfigUser;
$block = array();
$block['lang_home'] = _MB_SYSTEM_HOME;
- 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 selFilter
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function selFilter(id,value){
var div_arg1 = xoopsGetElementById(id+'_arg1');
var div_arg2 = xoopsGetElementById(id+'_arg2');
var div_arg3 = xoopsGetElementById(id+'_arg3');
Function supersubs
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.supersubs = function(options){
var opts = $.extend({}, $.fn.supersubs.defaults, options);
// return original object to support chaining
return this.each(function() {
// cache selections
Function addCombinator
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addCombinator( matcher, combinator, base ) {
var dir = combinator.dir,
checkNonElements = base && dir === "parentNode",
doneName = done++;
Method xoops_module_deactivate
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_deactivate($mid) {
global $icms_page_handler, $icms_block_handler, $icmsConfig, $icmsAdminTpl;
if (!isset($icms_page_handler)) {
$icms_page_handler = icms_getModuleHandler('pages', 'system');
}
Method b_system_info_show
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_system_info_show($options) {
global $icmsConfig;
$block = array();
if (!empty($options[3])) {
$block['showgroups'] = TRUE;
Method icms_get_base_domain
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function icms_get_base_domain($url)
{
$debug = 0;
$base_domain = '';
Method b_system_admin_cp_new_show
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_system_admin_cp_new_show() {
global $icmsTpl, $icmsConfig;
$block['lang_cp'] = _CPHOME;
Method easiestml
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function easiestml($s) {
global $easiestml_lang, $icmsConfigMultilang;
// all mode for debug (allowed to system admin only)
if (is_object(icms::$user) && icms::$user->isAdmin(1) && ! empty($_GET['lang']) && $_GET['lang'] == 'all') {
Method icms_getModuleHandler
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function &icms_getModuleHandler($name = null, $module_dir = null, $module_basename = null, $optional = false) {
static $handlers;
// if $module_dir is not specified
if (!isset($module_dir)) {
//if a module is loaded
Method exec
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function exec() {
if (!$this->getVar('sat_enabled')) return FALSE;
if (((int) $this->getVar('sat_lastruntime') + (int) $this->getVar('sat_interval') * 60) > time()) return FALSE;
$code = $this->getVar('sat_code');
ignore_user_abort(TRUE);
Method displayGroups
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function displayGroups() {
icms_cp_header();
echo '<div class="CPbigTitle" style="background-image: url(' . ICMS_MODULES_URL . '/system/admin/groups/images/groups_big.png)">' . _AM_EDITADG . '</div><br />';
$member_handler = icms::handler('icms_member');
$groups = $member_handler->getGroups();
Method AllowedModules
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function AllowedModules($mimetype, $module) {
$mimetypeid_allowed = $dirname_allowed = FALSE;
$GrantedItems = $this->UserCanUpload();
$criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('types', '%' . $mimetype . '%', 'LIKE'));
Method b_system_admin_cp_show
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_system_admin_cp_show() {
global $icmsTpl, $icmsConfig;
$block['lang_cp'] = _CPHOME;
$block['lang_insmodules'] = _AD_INSTALLEDMODULES;
Method b_system_newmembers_show
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_system_newmembers_show($options) {
global $icmsConfigUser;
$block = array();
$criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('level', 0, '>'));
Function serializeElements
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
serializeElements: function(elements, options) {
if (typeof options != 'object') options = { hash: !!options };
else if (Object.isUndefined(options.hash)) options.hash = true;
var key, value, submitted = false, submit = options.submit, accumulator, initial;
Function update
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function update(element, content) {
element = $(element);
var descendants = element.getElementsByTagName('*'),
i = descendants.length;
Method imcms_get_base_domain
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function imcms_get_base_domain($url)
{
$debug = 0;
$base_domain = '';
Function selFilter
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function selFilter(id,value){
var div_arg1 = xoopsGetElementById(id+'_arg1');
var div_arg2 = xoopsGetElementById(id+'_arg2');
var div_arg3 = xoopsGetElementById(id+'_arg3');
- 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"