Showing 1,049 of 26,336 total issues
Function load
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function load($data, &$datLen)
{
$datLen = 0;
while (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 RenderToFile
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function RenderToFile($filename)
{
if (preg_match('#^[a-z0-9]+://#i', $filename)) {
$this->DebugMessage('RenderToFile() failed because $filename (' . $filename . ') is a URL', __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 FixedAspectRatio
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function FixedAspectRatio()
{
// optional fixed-dimension images (regardless of aspect ratio)
if (!$this->far) {
- 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 ImageResizeFunction
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public function ImageResizeFunction(&$dst_im, &$src_im, $dstX, $dstY, $srcX, $srcY, $dstW, $dstH, $srcW, $srcH)
Function Brightness
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function Brightness(&$gdimg, $amount = 0)
{
if ($amount == 0) {
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
Method ImageCopyResampleBicubic
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
$dst_img,
$src_img,
$dst_x,
$dst_y,
$src_x,
Function SafeExec
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function SafeExec($command)
{
static $AllowedExecFunctions = array();
if (empty($AllowedExecFunctions)) {
$AllowedExecFunctions = array('shell_exec' => true, 'passthru' => true, 'system' => true, 'exec' => 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 Outline
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
hs.Outline = function (outlineType, onLoad) {
this.onLoad = onLoad;
this.outlineType = outlineType;
var v = hs.uaVersion, tr;
Function sizeOverlayBox
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
sizeOverlayBox: function (doWrapper, doPanels) {
var overlayBox = this.overlayBox,
x = this.x,
y = this.y;
hs.setStyles(overlayBox, {
Function Outline
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
hs.Outline = function (outlineType, onLoad) {
this.onLoad = onLoad;
this.outlineType = outlineType;
var v = hs.uaVersion, tr;
Function sizeOverlayBox
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
sizeOverlayBox: function (doWrapper, doPanels) {
var overlayBox = this.overlayBox,
x = this.x,
y = this.y;
hs.setStyles(overlayBox, {
Function close
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
close: function () {
if (this.isClosing || !this.isExpanded) return;
if (this.transitions[1] == 'crossfade' && hs.upcoming) {
hs.getExpander(hs.upcoming).cancelLoading();
hs.upcoming = null;
Function sizeOverlayBox
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
sizeOverlayBox: function (doWrapper, doPanels) {
var overlayBox = this.overlayBox,
x = this.x,
y = this.y;
hs.setStyles(overlayBox, {
Function Outline
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
hs.Outline = function (outlineType, onLoad) {
this.onLoad = onLoad;
this.outlineType = outlineType;
var v = hs.uaVersion, tr;
Function justify
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
justify: function (p, moveOnly) {
var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
var hasMovedMin = false;
Function Outline
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
hs.Outline = function (outlineType, onLoad) {
this.onLoad = onLoad;
this.outlineType = outlineType;
var v = hs.uaVersion, tr;
Function sizeOverlayBox
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
sizeOverlayBox: function (doWrapper, doPanels) {
var overlayBox = this.overlayBox,
x = this.x,
y = this.y;
hs.setStyles(overlayBox, {
Function justify
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
justify: function (p, moveOnly) {
var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
var hasMovedMin = false;
Method apcal_thedays_schedule_show_tpl
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function apcal_thedays_schedule_show_tpl($options)
{
global $xoopsConfig, $xoopsDB;
$moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
Method get_daily
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_daily($get_target = '', $query_string = '', $for_print = false)
{
// $PHP_SELF = $_SERVER['SCRIPT_NAME'] ;
// if( $get_target == '' ) $get_target = $PHP_SELF ;