Showing 702 of 1,100 total issues
Function URLreadFsock
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public static function URLreadFsock($host, $file, &$errstr, $successonly = true, $port = -1, $timeout = 10)
{
if (!function_exists('fsockopen') || self::FunctionIsDisabled('fsockopen')) {
$errstr = 'URLreadFsock says: function fsockopen() unavailable';
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 HistogramStretch
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function HistogramStretch(&$gdimg, $band = '*', $method = 0, $threshold = 0.1)
{
// equivalent of "Auto Contrast" in Adobe Photoshop
// method 0 stretches according to RGB colors. Gives a more conservative stretch.
// method 1 band stretches according to grayscale which is color-biased (59% green, 30% red, 11% blue). May give a punchier / more aggressive stretch, possibly appearing over-saturated
- 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 pups
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function pups($oid, $gender)
{
global $numofcolumns, $nummatch, $pages, $columns, $dogs;
$content = '';
Consider simplifying this complex logical expression. Open
if (
// aspect ratio needs to be preserved AND
($this->preserve_aspect_ratio || isset($auto_preserve_aspect_ratio))
&& // both width and height are given
pedigreeUtilities0
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
class pedigreeUtilities0
{
/**
* Function responsible for checking if a directory exists, we can also write in and create an index.html file
*
Method ErrorImage
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ErrorImage($text, $width = 0, $height = 0, $forcedisplay = false)
{
$width = ($width ?: $this->config_error_image_width);
$height = ($height ?: $this->config_error_image_height);
Method pups
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
function pups($oid, $gender)
{
global $numofcolumns, $numMatch, $pages, $columns, $dogs;
$content = '';
if (0 == $gender) {
Method pups
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function pups($oid, $gender)
{
global $numofcolumns, $numMatch, $pages, $columns, $dogs;
$content = '';
if (0 == $gender) {
Method ErrorImage
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ErrorImage($text, $width = 0, $height = 0, $forcedisplay = false)
{
$width = ($width ? $width : $this->config_error_image_width);
$height = ($height ? $height : $this->config_error_image_height);
Function applyPathSegment
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function applyPathSegment(&$segments, $segment)
{
if ('.' === $segment) {
return; // always remove
}
- 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 setCacheDirectory
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function setCacheDirectory()
{
// resolve cache directory to absolute pathname
$this->DebugMessage('setCacheDirectory() starting with config_cache_directory = "' . $this->config_cache_directory . '"', __FILE__, __LINE__);
if ('.' === mb_substr($this->config_cache_directory, 0, 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 AntiOffsiteLinking
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function AntiOffsiteLinking()
{
// Optional anti-offsite hijacking of the thumbnail script
$allow = true;
if ($allow && $this->config_nooffsitelink_enabled
- 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 setOutputFormat
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function setOutputFormat()
{
static $alreadyCalled = false;
if ($this->thumbnailFormat && $alreadyCalled) {
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 applyPathSegment
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function applyPathSegment(&$segments, $segment)
{
if ($segment == '.') {
return; // always remove
}
- 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 ImageCropAuto
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private function ImageCropAuto()
{
// ImageCropAuto
if (!is_null($this->ica)) {
$this->DebugMessage('ImageCropAuto(' . $this->ica . ') starting', __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
Method OutputThumbnail
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function OutputThumbnail()
{
$this->purgeTempFiles();
if (!$this->useRawIMoutput && !is_resource($this->gdimg_output)) {
Method GD2ICOstring
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function GD2ICOstring(&$gd_image_array)
{
$ImageWidths = [];
$ImageHeights = [];
$bpp = [];
Function initZoom
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
initZoom: function() {
var zoomSt = mfp.st.zoom,
ns = '.zoom',
image;
Method createList
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createList($result, $prefix, $link, $element)
{
$helper = XoopsModules\Pedigree\Helper::getInstance();
require_once $helper->path('include/common.php');
Function getImage
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
getImage: function(item, template) {
var guard = 0,
// image load complete handler