Showing 702 of 1,100 total issues
Function TColorPicker
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function TColorPicker(field) {
this.build0 = TCGenerateSafe;
this.build1 = TCGenerateWind;
this.build2 = TCGenerateGray;
this.build3 = TCGenerateMac;
Function change
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
change = function (ev) {
var cal = $(this).parent().parent(), col;
if (this.parentNode.className.indexOf('_hex') > 0) {
cal.data('colpick').color = col = hexToHsb(fixHex(this.value));
fillRGBFields(col, cal.get(0));
Function fromRGB
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.fromRGB = function (r, g, b, flags) { // null = don't change
if (r !== null) {
r = Math.max(0.0, Math.min(1.0, r));
}
if (g !== null) {
Function exportColor
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.exportColor = function (flags) {
if (!(flags && leaveValue) && valueElement) {
var value = this.toString();
if (this.caps) {
value = value.toUpperCase();
Method crop
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function crop($start_x, $start_y, $end_x, $end_y)
{
// this method might be also called internally
// in this case, there's a fifth argument that points to an already existing image identifier
$args = func_get_args();
Method pedigree_search
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function pedigree_search($queryarray, $andor, $limit, $offset, $userid)
{
global $xoopsDB;
// Start creating a sql string that will be used to retrieve the fields in the table
Method getForm
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getForm($action = false)
{
if (false === $action) {
$action = $_SERVER['REQUEST_URI'];
}
Method load
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function load($lpData, &$hdrLen)
{
$hdrLen = 0;
$this->m_lpVer = substr($lpData, 0, 6);
Consider simplifying this complex logical expression. Open
if ($this->iar && ((int)$this->w > 0) && ((int)$this->h > 0)) {
[$nw, $nh] = phpthumb_functions::TranslateWHbyAngle($this->w, $this->h, $this->ra);
$nw = ((0 != round($nw)) ? round($nw) : '');
$nh = ((0 != round($nh)) ? round($nh) : '');
$commandline .= ' -' . $IMresizeParameter . ' ' . phpthumb_functions::escapeshellarg_replacement($nw . 'x' . $nh . '!');
Consider simplifying this complex logical expression. Open
if ($this->iar && ((int)$this->w > 0) && ((int)$this->h > 0)) {
[$nw, $nh] = phpthumb_functions::TranslateWHbyAngle($this->w, $this->h, $this->ra);
$nw = ((round($nw) != 0) ? round($nw) : '');
$nh = ((round($nh) != 0) ? round($nh) : '');
$commandline .= ' -' . $IMresizeParameter . ' ' . phpthumb_functions::escapeshellarg_replacement($nw . 'x' . $nh . '!');
Function add_multi
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function add_multi($ch, $niv)
{
global $implx, $couls, $nl;
reset($implx);
$first = 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 CreateGDoutput
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function CreateGDoutput()
{
$this->CalculateThumbnailDimensions();
// create the GD image (either true-color or 256-color, depending on GD version)
- 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 setParameter
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function setParameter($param, $value)
{
if ('src' === $param) {
$this->setSourceFilename($this->ResolveFilenameToAbsolute($value));
} elseif (@is_array($this->$param)) {
- 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 __construct
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function __construct()
{
global $field;
// start the session and initialize the wizard
if (null === $_SESSION) {
- 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 recurseCopy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function recurseCopy(string $src, string $dst): void
{
$dir = \opendir($src);
// @mkdir($dst);
if (!@\mkdir($dst) && !\is_dir($dst)) {
- 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 rcopy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function rcopy(string $src, string $dest): bool
{
// Only continue if user is a 'global' Admin
if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
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 rmove
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function rmove(string $src, string $dest): bool
{
// Only continue if user is a 'global' Admin
if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
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 CreateGDoutput
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function CreateGDoutput()
{
$this->CalculateThumbnailDimensions();
// create the GD image (either true-color or 256-color, depending on GD version)
- 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 setParameter
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function setParameter($param, $value)
{
if ($param == 'src') {
$this->setSourceFilename($this->ResolveFilenameToAbsolute($value));
} elseif (@is_array($this->$param)) {
- 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 filesize_remote
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function filesize_remote($remotefile, $timeout = 10)
{
$size = false;
$parsed_url = self::ParseURLbetter($remotefile);
if ($fp = @fsockopen($parsed_url['host'], $parsed_url['port'], $errno, $errstr, $timeout)) {
- 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"