Showing 540 of 47,256 total issues
Function keynav
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.keynav = function (onClass,offClass) {
//Initialization
var kn = $.keynav;
if(!kn.init) {
kn.el = new Array();
Method icms_html2text
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function icms_html2text($document)
{
// PHP Manual:: function preg_replace
// $document should contain an HTML document.
// This will remove HTML tags, javascript sections
Method icms_getModuleConfig
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function &icms_getModuleConfig($moduleName = false)
{
static $icmsConfigs;
if(isset ($icmsConfigs[$moduleName]))
{
Method b_system_notification_show
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_system_notification_show() {
icms_loadLanguageFile('core', 'notification');
// Notification must be enabled, and user must be logged in
if (empty(icms::$user) || !icms_data_notification_Handler::isEnabled('block')) {
return false; // do not display block
Function xoopsCodeImg
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoopsCodeImg(id, enterImgUrlPhrase, enterImgPosPhrase, imgPosRorLPhrase, errorImgPosPhrase){
if (enterImgUrlPhrase == null) {
enterImgUrlPhrase = "Enter the URL of the image you want to add:";
}
var text = prompt(enterImgUrlPhrase, "");
Function addItem
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addItem(itemurl, name, target, cat, url, type) {
var win = opener;
var campo = win.document.getElementById(target);
var opcoes = win.document.getElementById('img_cat_'+cat);
var imagem = win.document.getElementById(target+'_img');
Method jalali_to_gregorian
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function jalali_to_gregorian($j_y, $j_m, $j_d) {
$g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
$j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
$jy = $j_y-979;
Method intval_allrequestsendid
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function intval_allrequestsendid() {
if ($this->_done_intval)
return true;
else
$this->_done_intval = true;
Method execute
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function execute($type) {
$ret = 0;
$filters = array ();
Method editcustomtag
has 32 lines of code (exceeds 25 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);
Method synchronize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function synchronize($id, $type) {
switch($type) {
case 'user':
// Array of tables from which to count 'posts'
$tables = array();
Function respondToReadyState
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
respondToReadyState: function(readyState) {
var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
if (state == 'Complete') {
try {
- 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 makeWritable
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function makeWritable( $path, $group = false, $recurse = false) {
if (!file_exists( $path )) {
return false;
}
$perm = @is_dir( $path ) ? 6 : 7;
- 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 deny_by_htaccess
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function deny_by_htaccess($ip = null) {
if (empty($ip)) $ip = filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP);
if (empty($ip)) return false;
if (!function_exists('file_get_contents')) 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 execute
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function execute() {
if (!function_exists('mb_strlen')) return true;
// registered users always pass this plugin
- 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 _spam_check_point_recursive
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function _spam_check_point_recursive($val) {
if (is_array($val)) {
foreach ($val as $subval) {
$this->_spam_check_point_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 _dblayertrap_check_recursive
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function _dblayertrap_check_recursive($val) {
if (is_array($val)) {
foreach ($val as $subval) {
$this->_dblayertrap_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 check_manipulation
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function check_manipulation() {
if ($_SERVER['SCRIPT_FILENAME'] == ICMS_ROOT_PATH . '/index.php') {
$root_stat = stat(ICMS_ROOT_PATH);
$index_stat = stat(ICMS_ROOT_PATH . '/index.php');
$finger_print = $root_stat['mtime'] . ':' . $index_stat['mtime'] . ':' . $index_stat['ino'];
- 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 xoInit
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function xoInit(): bool {
if (!$this->checkAccess()) {
return false;
}
if (@empty($_SERVER['REQUEST_URI'])) {
- 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_topposters_show
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function b_system_topposters_show($options) {
global $icmsConfigUser;
$block = array();
$criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('level', 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"