Showing 702 of 1,100 total issues
Function PlotPixelsGD
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function PlotPixelsGD(&$BMPdata, $truecolor = true)
{
$imagewidth = $BMPdata['header']['raw']['width'];
$imageheight = $BMPdata['header']['raw']['height'];
- 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 WatermarkOverlay
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function WatermarkOverlay(&$gdimg_dest, &$img_watermark, $alignment = '*', $opacity = 50, $margin_x = 5, $margin_y = null)
{
if ((is_resource($gdimg_dest) || (is_object($gdimg_dest) && $gdimg_dest instanceof \GdImage)) && (is_resource($img_watermark) || (is_object($img_watermark) && $img_watermark instanceof \GdImage))) {
$img_source_width = imagesx($gdimg_dest);
$img_source_height = imagesy($gdimg_dest);
- 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 MakePie
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function MakePie(
$filename,
$pieWidth,
$pieHeight,
$ShadowDistance,
File virtual.php
has 354 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
You may not change or alter any portion of this comment or credits of
supporting developers from this source code or any supporting source code
which is considered copyrighted (c) material of the original comment or credit
Method RenderOutput
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function RenderOutput()
{
if (!$this->useRawIMoutput && !is_resource($this->gdimg_output)) {
$this->DebugMessage('RenderOutput() failed because !is_resource($this->gdimg_output)', __FILE__, __LINE__);
Function pups
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
function pups($oid, $gender)
{
global $numofcolumns, $numMatch, $pages, $columns, $dogs;
$content = '';
if (0 == $gender) {
- 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 bas
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
function bas($oid, $pa, $ma)
{
global $numofcolumns1, $nummatch1, $pages1, $columns1, $dogs1;
if ('0' == $pa && '0' == $ma) {
$sqlQuery = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' WHERE father = ' . $pa . ' AND mother = ' . $ma . ' AND id != ' . $oid . " AND father != '0' AND mother !='0' ORDER BY pname";
- 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 OutputThumbnail
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function OutputThumbnail()
{
$this->purgeTempFiles();
if (!$this->useRawIMoutput && !is_resource($this->gdimg_output)) {
- 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 ErrorImage
has a Cognitive Complexity of 29 (exceeds 5 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);
- 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 SetCacheFilename
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function SetCacheFilename()
{
if (null !== $this->cache_filename) {
$this->DebugMessage('$this->cache_filename already set, skipping SetCacheFilename()', __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 pups
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public static function pups($oid, $gender)
{
global $numofcolumns, $nummatch, $pages, $columns, $dogs;
$content = '';
- 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 bas
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public static function bas($oid, $pa, $ma)
{
global $numofcolumns1, $nummatch1, $pages1, $columns1, $dogs1;
if ('0' == $pa && '0' == $ma) {
$sqlquery = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' WHERE father = ' . $pa . ' AND mother = ' . $ma . ' AND id != ' . $oid . " AND father != '0' AND mother !='0' ORDER BY pname";
- 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 bas
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public static function bas($oid, $pa, $ma)
{
global $numofcolumns1, $nummatch1, $pages1, $columns1, $dogs1;
if ('0' == $pa && '0' == $ma) {
$sqlQuery = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('pedigree_registry') . ' WHERE father = ' . $pa . ' AND mother = ' . $ma . ' AND id != ' . $oid . " AND father != '0' AND mother !='0' ORDER BY pname";
- 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 pups
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public static function pups($oid, $gender)
{
global $numofcolumns, $numMatch, $pages, $columns, $dogs;
$content = '';
if (0 == $gender) {
- 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 ErrorImage
has a Cognitive Complexity of 29 (exceeds 5 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);
- 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 URI
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
URI: function (uri) { // See RFC3986
this.scheme = null;
this.authority = null;
this.path = '';
Function apply_filter
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function apply_filter($filter, $arg1 = '', $arg2 = '', $arg3 = '', $arg4 = '')
{
// if "imagefilter" function exists and the requested filter exists
if (function_exists('imagefilter')) // if image resource was successfully created
{
- 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 ImageCreateFromStringReplacement
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ImageCreateFromStringReplacement(&$RawImageData, $DieOnErrors = false)
{
// there are serious bugs in the non-bundled versions of GD which may cause
// PHP to segfault when calling imagecreatefromstring() - avoid if at all possible
// when not using a bundled version of GD2
Function MaxFileSize
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function MaxFileSize()
{
if (phpthumb_functions::gd_version() < 2) {
$this->DebugMessage('Skipping MaxFileSize() because gd_version is "' . phpthumb_functions::gd_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 AntiOffsiteLinking
has a Cognitive Complexity of 27 (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 && (@$_SERVER['HTTP_REFERER'] || $this->config_nooffsitelink_require_refer)) {
- 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"