Showing 540 of 47,256 total issues
Method separateStringsInSQL
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function separateStringsInSQL($sql) {
$sql = trim($sql);
$sql_len = strlen($sql);
$char = '';
$string_start = '';
Method b_system_comments_show
has 50 lines of code (exceeds 25 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));
Function Str
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Str(key, holder, stack) {
var value = holder[key];
if (Type(value) === OBJECT_TYPE && typeof value.toJSON === 'function') {
value = value.toJSON(key);
}
Method apply_config
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function apply_config()
{
$xoopsDB = $GLOBALS['xoopsDB'];
$result = true;
Method imanager_clone
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function imanager_clone() {
global $target, $type;
if (!icms::$security->check()) {
redirect_header('browser.php?op=list&target=' . $target . '&type=' . $type, 3, implode('<br />', icms::$security->getErrors()));
Method imanager_clone
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function imanager_clone() {
if (!icms::$security->check()) {
redirect_header('admin.php?fct=images', 3, implode('<br />', icms::$security->getErrors()));
}
Function request
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
request: function(url) {
this.url = url;
this.method = this.options.method;
var params = Object.isString(this.options.parameters) ?
this.options.parameters :
- 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 setRequestHeaders
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
setRequestHeaders: function() {
var headers = {
'X-Requested-With': 'XMLHttpRequest',
'X-Prototype-Version': Prototype.Version,
'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
- 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 eliminate_dotdot
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function eliminate_dotdot() {
if ($this->_done_dotdot)
return true;
else
$this->_done_dotdot = 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 purge
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function purge($redirect_to_top = false) {
// clear all session values
if (isset($_SESSION)) foreach ($_SESSION as $key => $val) {
$_SESSION[$key] = '';
if (isset($GLOBALS[$key])) $GLOBALS[$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 execute
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function execute($type) {
$ret = 0;
$filters = 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_online_show
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function b_system_online_show() {
$online_handler = icms::handler('icms_core_Online');
mt_srand((double) microtime() * 1000000);
// set gc probabillity to 10% for now..
if (mt_rand(1, 100) < 11) {
- 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 select
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
select = Sizzle.select = function( selector, context, results, seed ) {
var i, tokens, token, type, find,
compiled = typeof selector === "function" && selector,
match = !seed && tokenize( (selector = compiled.selector || selector) );
Function superfish
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.superfish = function(op){
var sf = $.fn.superfish,
c = sf.c,
$arrow = $(['<span class="',c.arrowClass,'"> »</span>'].join('')),
Method apply_auth_db
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function apply_auth_db() {
$db = $GLOBALS['xoopsDB'];
$cat = getDbValue( $db, 'configcategory', 'confcat_id', "`confcat_name` ='_MD_AM_AUTHENTICATION'" );
if ($cat !== false && $cat != XOOPS_CONF_AUTH) {
Function tokenize
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tokenize( selector, parseOnly ) {
var matched, match, tokens, type,
soFar, groups, preFilters,
cached = tokenCache[ selector + " " ];
Method doRewrite
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function doRewrite() {
clearstatcache();
if (! $file = fopen($this->path,"r")) {
$this->error = true;
return false;
Method ext_date
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ext_date($time)
{
icms_loadLanguageFile('core', 'calendar');
/* $string = str_replace(
array(_CAL_AM, _CAL_PM, _CAL_AM_LONG, _CAL_PM_LONG, _CAL_SAT, _CAL_SUN, _CAL_MON, _CAL_TUE, _CAL_WED, _CAL_THU, _CAL_FRI, _CAL_SATURDAY, _CAL_SUNDAY, _CAL_MONDAY, _CAL_TUESDAY, _CAL_WEDNESDAY, _CAL_THURSDAY, _CAL_FRIDAY),
Method b_system_bookmarks_show
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_system_bookmarks_show() {
global $icmsConfig;
$block = array();
icms_loadLanguageFile('core', 'notification');
// User must be logged in
Method b_system_online_show
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_system_online_show() {
$online_handler = icms::handler('icms_core_Online');
mt_srand((double) microtime() * 1000000);
// set gc probabillity to 10% for now..
if (mt_rand(1, 100) < 11) {