Showing 32 of 478 total issues
Function rcopy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function rcopy($src, $dest)
{
// Only continue if user is a 'global' Admin
if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
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 rmove
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function rmove($src, $dest)
{
// Only continue if user is a 'global' Admin
if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
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
Method makeSelBox
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function makeSelBox($name, $fieldName, $prefix = '-', $selected = '', $addEmptyOption = false, $key = 0, $extra = '')
Method makeMySelBox
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function makeMySelBox($title, $order = '', $preset_id = 0, $none = 0, $sel_name = '', $onchange = '')
Avoid deeply nested control flow statements. Open
if (file_exists($templateFolder . $v)) {
unlink($templateFolder . $v);
}
Method lettersChoice
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function lettersChoice($myObject, $activeObject, $criteria, $name, $link, $link2 = null)
Method XoopsFormDateTimeI
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function XoopsFormDateTimeI($caption, $name, $size = 15, $value = 0, $interval = 10)
Method makeSelBoxOptionsArray
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function makeSelBoxOptionsArray($fieldName, $key, &$optionsArray, $prefix_orig, $prefix_curr = '')
Function printRow
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function printRow($ctime, $row, $tpos, $class)
{
global $xoopsDB;
$i = 0;
while ($i < count($tpos)) {
- 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 xoops_module_install_myconference
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function xoops_module_install_myconference(\XoopsModule $module)
{
require_once __DIR__ . '/../../../mainfile.php';
require_once __DIR__ . '/../include/config.php';
- 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 lettersChoice
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function lettersChoice($myObject, $activeObject, $criteria, $name, $link, $link2 = null)
{
/*
$pedigree = PedigreePedigree::getInstance();
xoops_load('XoopsLocal');
- 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 uploadPicture
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function uploadPicture($num)
{
$max_imgsize = $GLOBALS['xoopsModuleConfig']['maxfilesize']; //1024000;
$max_imgwidth = $GLOBALS['xoopsModuleConfig']['maximgwidth']; //1500;
$max_imgheight = $GLOBALS['xoopsModuleConfig']['maximgheight']; //1000;
- 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"