Showing 702 of 1,100 total issues
Method FixedAspectRatio
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function FixedAspectRatio()
{
// optional fixed-dimension images (regardless of aspect ratio)
if (!$this->far) {
Method Contrast
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Contrast(&$gdimg, $amount = 0)
{
if ($amount == 0) {
return true;
}
Function CONSANG
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function CONSANG($a)
{
global $fathers, $mothers, $ICknown, $COIs, $nl;
if (!$a || $ICknown[$a]) {
return 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 prepareDefaultvalue
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function prepareDefaultvalue()
{
if (0 == !$this->getValue('field')) {
// field already exists (editing mode)
- 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 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 CleanUpURLencoding
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function CleanUpURLencoding($url, $queryseperator = '&')
{
if (!0 === stripos($url, "http")) {
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 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 exif_info
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function exif_info()
{
static $exif_info = [];
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
Method pedigree_fields_post
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function pedigree_fields_post()
{
$config_fields = pedigree_get_config_fields();
foreach ($config_fields as $field => $prompt) {
$param = 'param_' . $field;
Function setColor
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
setColor: function (col, setCurrent) {
setCurrent = (typeof setCurrent === "undefined") ? 1 : setCurrent;
if (typeof col == 'string') {
col = hexToHsb(col);
} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
Method loadSampleData
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loadSampleData()
{
global $xoopsConfig;
$moduleDirName = \basename(\dirname(__DIR__));
$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
Function _openClick
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
_openClick: function(e, el, options) {
var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;
if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey ) ) {
Method one_animal
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function one_animal($ID)
{
global $xoopsDB;
global $sex, $val, $sosa, $detail, $sql3;
$content = '';
Function parseEl
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
parseEl: function(index) {
var item = mfp.items[index],
type;
if(item.tagName) {
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__);
Method ImageMagickVersion
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ImageMagickVersion($returnRAW = false)
{
static $versionstring = null;
if (null === $versionstring) {
$versionstring = [0 => false, 1 => false];
Method fieldmove
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function fieldmove($field, $move)
{
//find next id
$sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_fields') . " WHERE isActive = '1' ORDER BY `order`";
$result = $GLOBALS['xoopsDB']->query($sql);
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__);
Method GetAllFilesInSubfolders
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function GetAllFilesInSubfolders($dirname)
{
$AllFiles = [];
$dirname = rtrim(realpath($dirname), '/\\');
if ($dirhandle = @opendir($dirname)) {