Showing 1,049 of 26,336 total issues
Function expand
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
expand: function (a, params, custom, type) {
if (!a) a = hs.createElement('a', null, {display: 'none'}, hs.container);
if (typeof a.getParams == 'function') return params;
try {
new hs.Expander(a, params, custom);
- 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 Dimension
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
hs.Dimension = function (exp, dim) {
this.exp = exp;
this.dim = dim;
this.ucwh = dim == 'x' ? 'Width' : 'Height';
this.wh = this.ucwh.toLowerCase();
- 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 getPosition
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getPosition: function (el) {
var p = {x: el.offsetLeft, y: el.offsetTop};
while (el.offsetParent) {
el = el.offsetParent;
p.x += el.offsetLeft;
- 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 expand
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
expand: function (a, params, custom, type) {
if (!a) a = hs.createElement('a', null, {display: 'none'}, hs.container);
if (typeof a.getParams == 'function') return params;
try {
new hs.Expander(a, params, custom);
- 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 doShowHide
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
doShowHide: function (visibility) {
if (hs.hideSelects) this.showHideElements('SELECT', visibility);
if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
if (hs.geckoMac) this.showHideElements('*', visibility);
},
- 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 doShowHide
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
doShowHide: function (visibility) {
if (hs.hideSelects) this.showHideElements('SELECT', visibility);
if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
if (hs.geckoMac) this.showHideElements('*', visibility);
},
- 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 doShowHide
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
doShowHide: function (visibility) {
if (hs.hideSelects) this.showHideElements('SELECT', visibility);
if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
if (hs.geckoMac) this.showHideElements('*', visibility);
},
- 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 _lcsPos
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function _lcsPos($ypos)
{
$end = $this->lcs;
if ($end == 0 || $ypos > $this->seq[$end]) {
$this->seq[++$this->lcs] = $ypos;
- 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 stripUnusedVars
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function stripUnusedVars($name, &$template)
{
switch ($this->getAttribute($name, 'unusedvars')) {
case 'comment':
$template = preg_replace('/(' . $this->tag_start . '[^a-z{}]+' . $this->tag_end . ')/', "<!-- \\1 -->", $template);
- 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 getErrors
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getErrors($ashtml = true)
{
if ($ashtml) {
$ret = '';
foreach ($this->_errors as $msg) {
- 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 getColors
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function getColors() {
var isTheme = document.pref_form.apcal_thmORdefault.value;
if (isTheme == 1 || isTheme == 2) {
var xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
var themeFile = document.pref_form.apcal_thmCSS.value;
- 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 _block
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function _block($xbeg, $xlen, $ybeg, $ylen, &$edits)
{
$output = $this->_startBlock($this->_blockHeader($xbeg, $xlen, $ybeg, $ylen));
foreach ($edits as $edit) {
- 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 apcal_comments_update
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function apcal_comments_update($event_id, $total_num)
{
// record total_num
global $xoopsDB, $cal;
- 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 _make_js_hash
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function _make_js_hash($array)
{
$jstr = '';
// reset($array);
// while (list($key, $val) = each($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 get_yearly
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function get_yearly($get_target = '', $query_string = '', $for_print = false)
{
// $PHP_SELF = $_SERVER['SCRIPT_NAME'] ;
// if( $get_target == '' ) $get_target = $PHP_SELF ;
- 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 parse_posted_date
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function parse_posted_date($date_desc, $default_unixtime)
{
if (!preg_match('#^([0-9][0-9]+)[-./]?([0-1]?[0-9])[-./]?([0-3]?[0-9])$#', $date_desc, $regs)) {
$unixtime = $default_unixtime;
$use_default = 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 createFolder
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function createFolder($folder)
{
// try {
// if (!mkdir($folder) && !is_dir($folder)) {
// throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder));
- 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 redirect
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function redirect($query)
{
// character white list and black list against 'javascript'
if (!preg_match('/^[a-z0-9=&_-]*$/i', $query) || stristr($query, 'javascript')) {
header(strtr("Location: $this->connection://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}", "\r\n\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
Function get_monthly
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function get_monthly($get_target = '', $query_string = '', $for_print = false)
{
// $PHP_SELF = $_SERVER['SCRIPT_NAME'] ;
// if( $get_target == '' ) $get_target = $PHP_SELF ;
- 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 get_tz_options
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function get_tz_options($selected = 0)
{
$tzs = array(
'-12',
'-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"