Showing 702 of 1,100 total issues
File Zebra_Image.php
has 574 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Methods used with the {@link resize()} method.
*/
Function gd_info
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
function gd_info()
{
static $gd_info = [];
if (empty($gd_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 SourceImageToGD
has 236 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function SourceImageToGD()
{
if (is_resource($this->gdimg_source)) {
$this->source_width = imagesx($this->gdimg_source);
$this->source_height = imagesy($this->gdimg_source);
Function menu_block
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
function menu_block()
{
$helper = Helper::getInstance();
[$actlink, $even, $odd, $text, $hovlink, $head, $body, $title] = Utility::getColourScheme();
- 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 functions.php
has 551 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 authors.
Method phpThumbDebug
has 228 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function phpThumbDebug($level = '')
{
if ($level && ($this->phpThumbDebug !== $level)) {
return true;
}
File phpThumb.php
has 544 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
//////////////////////////////////////////////////////////////
// phpThumb() by James Heinrich <info@silisoftware.com> //
// available at http://phpthumb.sourceforge.net //
// and/or https://github.com/JamesHeinrich/phpThumb //
Method userfields
has 226 lines of code (exceeds 25 allowed). Consider refactoring. Open
function userfields($field = 0)
{
global $field;
require_once __DIR__ . '/include/checkoutwizard.php';
Function menu_block
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
function menu_block()
{
$moduleDirName = basename(\dirname(__DIR__));
$helper = Helper::getInstance();
- 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 drawPicker
has 219 lines of code (exceeds 25 allowed). Consider refactoring. Open
function drawPicker(x, y) {
if (!jscolor.picker) {
jscolor.picker = {
box: document.createElement('div'),
boxB: document.createElement('div'),
Method listBlocks
has 213 lines of code (exceeds 25 allowed). Consider refactoring. Open
function listBlocks()
{
global $xoopsModule, $pathIcon16;
require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
$moduleDirName = basename(\dirname(__DIR__));
phpthumb
has 59 functions (exceeds 20 allowed). Consider refactoring. Open
class phpthumb
{
// public:
// START PARAMETERS (for object mode and phpThumb.php)
// See phpthumb.readme.txt for descriptions of what each of these values are
phpthumb
has 58 functions (exceeds 20 allowed). Consider refactoring. Open
class phpthumb
{
// public:
// START PARAMETERS (for object mode and phpThumb.php)
// See phpthumb.readme.txt for descriptions of what each of these values are
Function truncateHtml
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
public static function truncateHtml(
string $text,
?int $length = 100,
?string $ending = '...',
?bool $exact = 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 Rotate
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
public function Rotate()
{
if ($this->ra || $this->ar) {
if (!function_exists('imagerotate')) {
$this->DebugMessage('!function_exists(imagerotate)', __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 Rotate
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
public function Rotate()
{
if ($this->ra || $this->ar) {
if (!function_exists('imagerotate')) {
$this->DebugMessage('!function_exists(imagerotate)', __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
File colpick.js
has 509 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
colpick Color Picker
Copyright 2013 Jose Vargas. Licensed under GPL license. Based on Stefan Petre's Color Picker www.eyecon.ro, dual licensed under the MIT and GPL licenses
For usage and examples: colpick.com/plugin
Method phpThumbDebug
has 205 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function phpThumbDebug($level = '')
{
if ($level && ($this->phpThumbDebug !== $level)) {
return true;
}
Function ImageCreateFromStringReplacement
has a Cognitive Complexity of 51 (exceeds 5 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
- 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 ImageCreateFromStringReplacement
has a Cognitive Complexity of 49 (exceeds 5 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
- 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"