Showing 540 of 47,256 total issues
Function getPixelValue
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getPixelValue(value, property, context) {
var element = null;
if (Object.isElement(value)) {
element = value;
value = getRawStyle(element, property);
Function matcherFromTokens
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function matcherFromTokens( tokens ) {
var checkContext, matcher, j,
len = tokens.length,
leadingRelative = Expr.relative[ tokens[0].type ],
implicitRelative = leadingRelative || Expr.relative[" "],
Method check_uploaded_files
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function check_uploaded_files() {
if ($this->_done_badext)
return $this->_safe_badext;
else
$this->_done_badext = true;
Function xoopsCodeUrl
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function xoopsCodeUrl(id, enterUrlPhrase, enterWebsitePhrase){
if (enterUrlPhrase == null) {
enterUrlPhrase = "Enter the URL of the link you want to add:";
}
var text = prompt(enterUrlPhrase, "");
- 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 lastday
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function lastday ($month,$day,$year) {
$lastdayen=date('d',mktime(0,0,0,$month+1,0,$year));
list( $jyear, $jmonth, $jday ) = gregorian_to_jalali($year, $month, $day);
$lastdatep=$jday;
while ($jday!='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 showNav
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function showNav($id = null, $separador = '/', $style="style='font-weight:bold'")
{
$url = ICMS_URL.'/content.php';
if($id == false) {return false;}
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 draw_repost_form
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function draw_repost_form($area = '') {
// Notify which file is broken
if (headers_sent()) {
restore_error_handler();
set_error_handler(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 editblock
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function editblock($bid = 0, $clone = FALSE) {
global $icms_block_handler, $icmsAdminTpl;
$blockObj = $icms_block_handler->get($bid);
- 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_admin_cp_new_show
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function b_system_admin_cp_new_show() {
global $icmsTpl, $icmsConfig;
$block['lang_cp'] = _CPHOME;
- 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_admin_cp_show
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function b_system_admin_cp_show() {
global $icmsTpl, $icmsConfig;
$block['lang_cp'] = _CPHOME;
$block['lang_insmodules'] = _AD_INSTALLEDMODULES;
- 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 _begin
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
_begin: function() {
if (this._isPrepared()) return;
var element = this.element;
if (isDisplayed(element)) {
Method disable_features
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function disable_features() {
// disable "Notice: Undefined index: ..."
$error_reporting_level = error_reporting(0);
Method convert_table
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function convert_table($tables, $charset, $collation) {
// Initialize vars.
$string_querys = array();
$binary_querys = array();
$gen_index_querys = array();
Method icms_wordwrap
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function icms_wordwrap($str, $width, $break = '/n', $cut = false)
{
if(strtolower(_CHARSET) !== 'utf-8')
{
$str = wordwrap($str, $width, $break, $cut);
Method editform
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editform() {
$ret =
"<table width='100%' class='outer' cellspacing='5'>
<tr>
<th colspan='2'></th>
Consider simplifying this complex logical expression. Open
if ( text != null && text != "" ) {
if (enterImgPosPhrase == null) {
enterImgPosPhrase = "Now, enter the position of the image.";
}
if (imgPosRorLPhrase == null) {
Method write_mainfile
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function write_mainfile($vars) {
if (empty($vars)) {
return false;
}
Method b_system_social_show
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_system_social_show($options) {
$block = array();
$block['provider'] = array();
$i = 0;
Function getElementsByClassName
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
function iter(name) {
return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
}
- 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_getModuleInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function &icms_getModuleInfo($moduleName = false)
{
static $icmsModules;
if(isset($icmsModules[$moduleName]))
{
- 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"