Showing 702 of 1,100 total issues
Function rrmdir
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function rrmdir(string $src): bool
{
// 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 FixedAspectRatio
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function FixedAspectRatio()
{
// optional fixed-dimension images (regardless of aspect ratio)
if (!$this->far) {
- 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 __construct
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($target)
{
// global $helper;
$this->helper = $target->helper;
$this->targetObject = $target;
- 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 RenderToFile
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function RenderToFile($filename)
{
if (preg_match('#^[a-z0-9]+://#i', $filename)) {
$this->DebugMessage('RenderToFile() failed because $filename (' . $filename . ') is a URL', __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 __construct
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($target)
{
// global $helper;
$this->helper = $target->helper;
$this->targetObject = $target;
- 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 ImageResizeFunction
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public function ImageResizeFunction(&$dst_im, &$src_im, $dstX, $dstY, $srcX, $srcY, $dstW, $dstH, $srcW, $srcH)
Function load
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function load($data, &$datLen)
{
$datLen = 0;
while (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 listuserfields
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function listuserfields()
{
$sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " WHERE isActive = '1' ORDER BY `order`";
$result = $GLOBALS['xoopsDB']->query($sql);
$numrows = $GLOBALS['xoopsDB']->getRowsNum($result);
- 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 ImageResizeFunction
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public function ImageResizeFunction(&$dst_im, &$src_im, $dstX, $dstY, $srcX, $srcY, $dstW, $dstH, $srcW, $srcH)
Function RenderToFile
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function RenderToFile($filename)
{
if (preg_match('#^[a-z0-9]+://#i', $filename)) {
$this->DebugMessage('RenderToFile() failed because $filename (' . $filename . ') is a URL', __FILE__, __LINE__);
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 FixedAspectRatio
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function FixedAspectRatio()
{
// optional fixed-dimension images (regardless of aspect ratio)
if (!$this->far) {
- 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 Brightness
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function Brightness(&$gdimg, $amount = 0)
{
if ($amount == 0) {
return 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
Method ImageCopyResampleBicubic
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function ImageCopyResampleBicubic($dst_img, $src_img, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h)
Function SafeExec
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function SafeExec($command)
{
static $AllowedExecFunctions = [];
if (empty($AllowedExecFunctions)) {
$AllowedExecFunctions = ['shell_exec' => true, 'passthru' => true, 'system' => true, 'exec' => 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
Method dist_m
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function dist_m($m)
{
global $IDs, $fathers, $mothers, $mater, $nb_gen, $detail, $nl;
// Anim #M is the dam
$listall = [$m];
Method database_oa
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function database_oa()
{
global $xoopsTpl;
$form = _AM_PEDIGREE_DATABASE_CHECK_ANCESTORS;
$sql = 'SELECT d.id AS d_id, d.pname AS d_pname
Method dist_p
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function dist_p($p)
{
global $IDs, $fathers, $mothers, $pater, $nb_gen, $detail, $nl;
// Anim #P is the sire
$listall = [$p];
Function magnificPopup
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.magnificPopup = function(options) {
_checkInstance();
var jqEl = $(this);
Method CONSANG
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function CONSANG($a)
{
global $fathers, $mothers, $ICknown, $COIs, $nl;
if (!$a || $ICknown[$a]) {
return 0;
Method ImageCropAuto
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function ImageCropAuto()
{
// ImageCropAuto
if (!is_null($this->ica)) {
$this->DebugMessage('ImageCropAuto(' . $this->ica . ') starting', __FILE__, __LINE__);