Showing 540 of 47,256 total issues
File index.php
has 485 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Upgrade script of ImpressCMS 1.0 to 1.1
*
* @copyright http://www.impresscms.org/ The ImpressCMS Project
Method imanager_listimg
has 185 lines of code (exceeds 25 allowed). Consider refactoring. Open
function imanager_listimg($imgcat_id, $start = 0) {
global $icmsTpl, $target, $type, $query, $limit;
if (!is_object(icms::$user)) {
$groups = array(ICMS_GROUP_ANONYMOUS);
File edituser.php
has 463 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// $Id: edituser.php 12313 2013-09-15 21:14:35Z skenow $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
Function check
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
function check($post = true, $area = '', $allow_repost = true) {
global $xoopsModule;
$this->_errors = 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 b_system_waiting_show
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
function b_system_waiting_show($options) {
global $icmsConfig;
$userlang = $icmsConfig['language'] ;
- 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
File main.php
has 461 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// $Id: main.php 12313 2013-09-15 21:14:35Z skenow $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
Method imanager_listimg
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
function imanager_listimg($imgcat_id, $start = 0) {
global $icmsAdminTpl, $query, $limit;
if (!is_object(icms::$user)) {
$groups = array(ICMS_GROUP_ANONYMOUS);
Method imanager_index
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
function imanager_index($imgcat_id = NULL) {
global $icmsAdminTpl, $icmsConfig, $limit;
if (!is_object(icms::$user)) {
$groups = array(ICMS_GROUP_ANONYMOUS);
Function apply_conf
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
private function apply_conf() {
$db = $GLOBALS['xoopsDB'];
if (getDbValue($db, 'configcategory', 'confcat_id', ' confcat_name="_MD_AM_CONTMANAGER"') != 0){return true;}
$db->queryF(" INSERT INTO " . $db->prefix("configcategory") . " (confcat_id, confcat_name) VALUES ('9', '_MD_AM_CONTMANAGER')");
if (getDbValue($db, 'configcategory', 'confcat_id', ' confcat_name="_MD_AM_PERSON"') != 0){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 check_uploaded_files
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
function check_uploaded_files() {
if ($this->_done_badext)
return $this->_safe_badext;
else
$this->_done_badext = 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
Method imanager_index
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
function imanager_index($imgcat_id = NULL) {
global $icmsTpl, $icmsConfig, $target, $type, $limit;
if (!is_object(icms::$user)) {
$groups = array(ICMS_GROUP_ANONYMOUS);
Function protector_onupdate_base
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
function protector_onupdate_base($module, $mydirname) {
// transations on module update
global $msgs; // TODO :-D
if (!is_array($msgs)) $msgs = 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
Method apply_block
has 163 lines of code (exceeds 25 allowed). Consider refactoring. Open
function apply_block()
{
global $xoopsDB;
$xoopsDB->queryF("UPDATE " . $xoopsDB->prefix("block_module_link") . " SET module_id = -1, pageid = 0 WHERE module_id < 2 AND pageid = 1");
Function disable_features
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
function disable_features() {
// disable "Notice: Undefined index: ..."
$error_reporting_level = error_reporting(0);
- 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_conf
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function apply_conf() {
$db = $GLOBALS['xoopsDB'];
if (getDbValue($db, 'configcategory', 'confcat_id', ' confcat_name="_MD_AM_CONTMANAGER"') != 0){return true;}
$db->queryF(" INSERT INTO " . $db->prefix("configcategory") . " (confcat_id, confcat_name) VALUES ('9', '_MD_AM_CONTMANAGER')");
if (getDbValue($db, 'configcategory', 'confcat_id', ' confcat_name="_MD_AM_PERSON"') != 0){return true;}
Function apply_block
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
function apply_block()
{
global $xoopsDB;
$xoopsDB->queryF("UPDATE " . $xoopsDB->prefix("block_module_link") . " SET module_id = -1, pageid = 0 WHERE module_id < 2 AND pageid = 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 separateStringsInSQL
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
function separateStringsInSQL($sql) {
$sql = trim($sql);
$sql_len = strlen($sql);
$char = '';
$string_start = '';
- 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 formatTimestamp
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
function formatTimestamp($time, $format = "l", $timeoffset = null)
{
global $icmsConfig;
$format_copy = $format;
Protector
has 42 functions (exceeds 20 allowed). Consider refactoring. Open
class Protector {
var $mydirname;
var $_conn = null;
var $_conf = array();
var $_conf_serialized = '';
Method xoops_module_update_system
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
global $xoTheme;
$from_112 = $abortUpdate = false;