Showing 702 of 1,100 total issues
Avoid deeply nested control flow statements. Open
switch ($errno) {
case 200:
// great, continue
break;
Method URLreadFsock
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function URLreadFsock($host, $file, &$errstr, $successonly = true, $port = -1, $timeout = 10)
Consider simplifying this complex logical expression. Open
if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey ) ) {
return;
}
Method pedigree_search
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function pedigree_search($queryarray, $andor, $limit, $offset, $userid)
Method apply_filter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function apply_filter($filter, $arg1 = '', $arg2 = '', $arg3 = '', $arg4 = '')
Function TCBuildCell
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function TCBuildCell(R, G, B, w, h) {
Method truncateHtml
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
string $text,
?int $length = 100,
?string $ending = '...',
?bool $exact = false,
?bool $considerHtml = true
Method ImprovedImageRotate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function ImprovedImageRotate(&$gdimg_source, $rotate_angle = 0, $config_background_hexcolor = 'FFFFFF', $bg = null, &$phpThumbObject)
Method Crop
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function Crop(&$gdimg, $left = 0, $right = 0, $top = 0, $bottom = 0)
Method ImageColorAllocateAlphaSafe
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function ImageColorAllocateAlphaSafe(&$gdimg_hexcolorallocate, $R, $G, $B, $alpha = false)
Method ImageBorder
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function ImageBorder(&$gdimg, $border_width, $radius_x, $radius_y, $hexcolor_border)
Function getViewPos
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getViewPos: function () {
if (typeof window.pageYOffset === 'number') {
return [window.pageXOffset, window.pageYOffset];
} else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) {
return [document.body.scrollLeft, document.body.scrollTop];
- 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 TCPaint
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function TCPaint(c, b_noPref) {
c = (b_noPref ? '' : '#') + c.toUpperCase();
if (this.o_samp)
this.o_samp.innerHTML = '<span style="font-family: Tahoma; font-size: x-small; ">' + c + ' <span style="color: white; ">' + c + '</span></span>';
if (this.doc.layers)
- 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 detectDir
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
detectDir: function () {
var base = location.href;
var e = document.getElementsByTagName('base');
for (var i = 0; i < e.length; i += 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 isInOpenBasedir
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function isInOpenBasedir($path)
{
static $open_basedirs = null;
if (null === $open_basedirs) {
$ini_text = ini_get('open_basedir');
- 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 setSourceData
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function setSourceData($rawImageData, $sourceFilename = '')
{
//$this->resetObject();
//$this->sourceFilename = null;
$this->rawImageData = $rawImageData;
- 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 getParents
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getParents()
{
$parents = ['mother' => ['id' => 0, 'name' => ''], 'father' => ['id' => 0, 'name' => '']]; //init the
//get the Tree Handler and retrieve parent info
$treeHandler = XoopsModules\Pedigree\Helper::getInstance()->getHandler('Tree');
- 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 getEditor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function getEditor(?\Xmf\Module\Helper $helper = null, ?array $options = null)
{
/** @var Helper $helper */
if (null === $options) {
$options = [];
- 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 getDirectoryStatus
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function getDirectoryStatus($path, $mode = 0777, $redirectFile = null)
{
global $pathIcon16;
if (empty($path)) {
- 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 load
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function load($lpData, &$hdrLen)
{
$hdrLen = 0;
$this->m_lpVer = substr($lpData, 0, 6);
- 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"