Showing 1,049 of 26,336 total issues
Function imageCreate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
imageCreate: function () {
var exp = this;
var img = document.createElement('img');
this.content = img;
- 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 copy_templates_db2db
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function copy_templates_db2db($tplset_from, $tplset_to, $whr_append = '1')
{
global $db;
// get tplfile and tplsource
- 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 getVar
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getVar($template, $var)
{
// should the var from a different template be used
if (stristr($var, '.')) {
list($template, $var) = explode('.', $var);
- 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 _loadAllChildItemIds
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function _loadAllChildItemIds($itemId, &$childIds)
{
if (!empty($this->_itemTree[$itemId]['children'])) {
$first_child = $this->_itemTree[$itemId]['children'];
foreach ($first_child as $fcid) {
- 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_browser_can_use_spaw
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function check_browser_can_use_spaw()
{
$browser = $_SERVER['HTTP_USER_AGENT'];
// check if msie
if (preg_match('/MSIE[^;]*/i', $browser, $msie)) {
- 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_submitter_info
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function get_submitter_info($uid)
{
if ($uid <= 0) {
return _GUESTS;
}
- 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_sitemap_APCal_base
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function b_sitemap_APCal_base($moduleDirName)
{
global $xoopsConfig, $xoopsDB, $xoopsUser;
$myts = MyTextSanitizer::getInstance();
- 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_sql_set
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function get_sql_set($event, $cols)
{
$ret = '';
foreach ($cols as $col => $types) {
- 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 addMenuTabsArray
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function addMenuTabsArray($options, $multi = true)
{
if (is_array($options)) {
if ($multi === true) {
foreach ($options as $k => $v) {
- 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 addMenuTopArray
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function addMenuTopArray($options, $multi = true)
{
if (is_array($options)) {
if ($multi === true) {
foreach ($options as $k => $v) {
- 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 phpThumb
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function phpThumb()
{
$this->DebugTimingMessage('phpThumb() constructor', __FILE__, __LINE__);
$this->DebugMessage('phpThumb() v' . $this->phpthumb_version, __FILE__, __LINE__);
- 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 exif_info
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function exif_info()
{
static $exif_info = array();
if (empty($exif_info)) {
// based on code by johnschaefer at gmx dot de
- 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 version_compare_replacement_sub
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function version_compare_replacement_sub($version1, $version2, $operator = '')
{
// If you specify the third optional operator argument, you can test for a particular relationship.
// The possible operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively.
// Using this argument, the function will return 1 if the relationship is the one specified by the operator, 0 otherwise.
- 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 CleanUpURLencoding
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function CleanUpURLencoding($url, $queryseperator = '&')
{
if (!preg_match('#^http#i', $url)) {
return $url;
}
- 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 showMonthsCombo
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Calendar.showMonthsCombo = function () {
var cal = Calendar._C;
if (!cal) {
return false;
}
Method issue
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function issue($salt = '', $timeout = 1800, $area = '')
{
global $xoopsModule;
if ('' === $salt) {
if (function_exists('mcrypt_create_iv') && !defined('PHALANGER')) {
Method set_date
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function set_date($setdate)
{
if (!(preg_match("/^([0-9][0-9]+)[-.\/]?([0-1]?[0-9])[-.\/]?([0-3]?[0-9])$/", $setdate, $regs)
&& checkdate($regs[2], $regs[3], $regs[1]))
) {
Method ImageMagickVersion
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ImageMagickVersion($returnRAW = false)
{
static $versionstring = null;
if (is_null($versionstring)) {
$versionstring = array(0 => false, 1 => false);
Method deInterlace
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function deInterlace()
{
$data = $this->m_data;
for ($i = 0; $i < 4; $i++) {
Method phpThumb
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function phpThumb()
{
$this->DebugTimingMessage('phpThumb() constructor', __FILE__, __LINE__);
$this->DebugMessage('phpThumb() v' . $this->phpthumb_version, __FILE__, __LINE__);