Showing 1,049 of 26,336 total issues
Avoid deeply nested control flow statements. Open
if ($event->start + $tzoffset >= $bottomtime_of_day
|| $event->start + $tzoffset != $toptime_of_day
&& $event->end + $tzoffset <= $toptime_of_day
) {
continue;
Method apcal_search_base
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function apcal_search_base($moduleDirName, $keywords, $andor, $limit, $offset, $uid)
Function apcal_thedays_schedule_show_tpl
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function apcal_thedays_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[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
Avoid deeply nested control flow statements. Open
if ($expire > time() && $prev_uid == $uid) {
$block = unserialize($cache_bodies[2]);
if ($robots_mode) {
$block['root_url'] = $block['mod_url'] . '/';
// $block['php_self'] = '/' ;
Avoid deeply nested control flow statements. Open
if ($mode === 'NO_YEAR' && ($gmlat > 0 || $gmlong > 0)) {
$this->gmPoints[] = array(
'summary' => $title,
'gmlat' => $gmlat,
'gmlong' => $gmlong,
Function recurseCopy
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function recurseCopy($src, $dst)
{
$dir = opendir($src);
// @mkdir($dst);
while (false !== ($file = readdir($dir))) {
- 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
Avoid deeply nested control flow statements. Open
for ($d = $startDay; $d <= $endDay; ++$d) {
if (isset($eventsids[$d][$i])) {
$ok = false;
}
}
Function apcal_after_schedule_show_tpl
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function apcal_after_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[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_categories_selform
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function get_categories_selform($get_target = '', $smode = null)
{
global $xoopsModule;
if (empty($this->categories)) {
- 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
Avoid deeply nested control flow statements. Open
if ($event->start + $tzoffset >= $now_unixtime + 86400
|| $event->end + $tzoffset <= $now_unixtime
) {
continue;
}
Avoid deeply nested control flow statements. Open
if ($event->extkey0 == 1) {
$event_str .= " <img src='{$roimage}' height='15px' alt='" . _APCAL_RO_ONLINE_POSS . "' title='" . _APCAL_RO_ONLINE_POSS . "' />";
} // added by goffy: mark this event, that online registration is active
Function file_exists_ignoreopenbasedir
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function file_exists_ignoreopenbasedir($filename, $cached = true)
{
static $open_basedirs = null;
static $file_exists_cache = array();
if (!$cached || !isset($file_exists_cache[$filename])) {
- 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
Avoid deeply nested control flow statements. Open
switch ($secondbyte) {
case 0:
// end of line
// no need for special processing, just ignore
break;
Avoid deeply nested control flow statements. Open
for ($col = 0; $col < $thisfile_bmp_header_raw['width']; $col++) {
$paletteindex = ord($BMPpixelData{$pixeldataoffset++});
$thisfile_bmp['data'][$row][$col] = $thisfile_bmp['palette'][$paletteindex];
}
Function ImageMagickWhichConvert
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function ImageMagickWhichConvert()
{
static $WhichConvert = null;
if (is_null($WhichConvert)) {
if ($this->iswindows) {
- 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
Avoid deeply nested control flow statements. Open
for ($col = 0; $col < $thisfile_bmp_header_raw['width']; $col++) {
$pixelvalue = $this->LittleEndian2Int(substr($BMPpixelData, $pixeldataoffset, $thisfile_bmp_header_raw['bits_per_pixel'] / 8));
$pixeldataoffset += $thisfile_bmp_header_raw['bits_per_pixel'] / 8;
$red = (int)round(((($pixelvalue & $thisfile_bmp_header_raw['red_mask']) >> $redshift) / ($thisfile_bmp_header_raw['red_mask']
Avoid deeply nested control flow statements. Open
if (!phpthumb_functions::IsHexColor($color)) {
$color = ((!empty($this->bc)
&& phpthumb_functions::IsHexColor($this->bc)) ? $this->bc : '000000');
}
Function GenerateThumbnail
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function GenerateThumbnail()
{
$this->setOutputFormat();
$this->phpThumbDebug('8a');
$this->ResolveSource();
- 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
Avoid deeply nested control flow statements. Open
if (strlen($imgdata) <= $this->maxb) {
break;
}
Function deInterlace
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function deInterlace()
{
$data = $this->m_data;
for ($i = 0; $i < 4; $i++) {
- 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"