Showing 702 of 1,100 total issues
Method createList
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createList($result, $prefix, $link, $element)
{
global $xoopsTpl;
$animal = new Pedigree\Animal();
//test to find out how many user fields there are...
Method ImageCreateFromFilename
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ImageCreateFromFilename($filename)
{
// try to create GD image source directly via GD, if possible,
// rather than buffering to memory and creating with imagecreatefromstring
$ImageCreateWasAttempted = false;
Method ImageCreateFromFilename
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ImageCreateFromFilename($filename)
{
// try to create GD image source directly via GD, if possible,
// rather than buffering to memory and creating with imagecreatefromstring
$ImageCreateWasAttempted = false;
Function _create_from_source
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
private function _create_from_source()
{
// perform some error checking first
// if the GD library is not installed
if (!function_exists('gd_info')) {
- 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 chrono_sort
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function chrono_sort()
{
global $IDs, $inds, $fathers, $mothers, $chrono, $nl, $detail;
$impr = 0;
$modif = 1;
- 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 completeCallback
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function completeCallback()
{
//can this field be searched
$search = $this->getValue('hassearch');
if ('hassearch' === $search) {
- 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 applyUnsharpMask
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public static function applyUnsharpMask(&$img, $amount, $radius, $threshold)
{
// $img is an image that is already created within php using
// imgcreatetruecolor. No url! $img must be a truecolor image.
- 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
File pedigree2.php
has 295 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// -------------------------------------------------------------------------
//require_once \dirname(__DIR__, 2) . '/mainfile.php';
use Xmf\Request;
Method createList
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createList($result, $prefix, $link, $element)
{
global $xoopsTpl;
$animal = new Pedigree\Animal();
//test to find out how many user fields there are...
Method SafeURLread
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function SafeURLread($url, &$error, $timeout = 10, $followredirects = true)
{
$error = '';
$errstr = '';
$rawData = '';
ZervWizard
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class ZervWizard
{
// whether or not all steps of the form are complete
public $_complete = false;
// internal array to store the various steps
Method Rotate
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Rotate()
{
if ($this->ra || $this->ar) {
if (!function_exists('imagerotate')) {
$this->DebugMessage('!function_exists(imagerotate)', __FILE__, __LINE__);
Method Rotate
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Rotate()
{
if ($this->ra || $this->ar) {
if (!function_exists('imagerotate')) {
$this->DebugMessage('!function_exists(imagerotate)', __FILE__, __LINE__);
Method GENEALOGY
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
function GENEALOGY()
{
global $IDs, $fathers, $mothers, $inds, $nb_gen, $nb_maxi, $nbani, $nl, $sql1;
$impr = 0;
$fathers[0] = $IDs[1];
Method getBmp
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getBmp($bgColor)
{
$out = '';
if (!$this->m_bLoaded) {
Method getPng
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getPng($bgColor)
{
$out = '';
if (!$this->m_bLoaded) {
Method AlphaChannelFlatten
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function AlphaChannelFlatten()
{
if (!$this->is_alpha) {
// image doesn't have alpha transparency, no need to flatten
$this->DebugMessage('skipping AlphaChannelFlatten() because !$this->is_alpha', __FILE__, __LINE__);
Function calc_dist
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function calc_dist() /* Common Ascendants and their distances */
{
global $IDs, $fathers, $mothers, $nbanims, $pater, $mater, $empty, $nb_gen, $nl;
global $dmax, $detail, $nb_gen;
$distan = [];
- 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 phpThumbDebug
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function phpThumbDebug($level = '')
{
if ($level && ($this->phpThumbDebug !== $level)) {
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
Function checkVerModule
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public static function checkVerModule(
\Xmf\Module\Helper $helper,
?string $source = 'github',
?string $default = 'master'
): array {
- 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"