Showing 701 of 9,653 total issues
Avoid deeply nested control flow statements. Open
if(!opts.fade_panels) {
j_panels.hide().eq(i%item_count).show();
}
Method _parseLongOption
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
Method PclTarHandleAddFile
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function PclTarHandleAddFile($p_tar, $p_filename, $p_mode, &$p_header, $p_add_dir, $p_remove_dir)
Method PclTarHandleExtractByIndexList
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$p_tarname,
$p_index_string,
&$p_list_detail,
$p_path,
$p_remove_path,
Method _parseShortOption
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected static function _parseShortOption($arg, $short_options, &$opts, &$argIdx, $args, $skip_unknown)
Function add_or_update_or_delete_meta
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function add_or_update_or_delete_meta($post_id, $name, $value)
{
$key = 'ml-slider_' . $name;
if ('false' === $value || '' === $value || !$value) {
- 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 _parseArgs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function _parseArgs($argv, $short_options, $long_options = null)
{
if (!is_array($argv) && null !== $argv) {
/*
// Quote all items that are a short option
- 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 PclTarHandleAppend
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function PclTarHandleAppend($p_tarname, $p_list, $p_mode, &$p_list_detail, $p_add_dir, $p_remove_dir)
Avoid deeply nested control flow statements. Open
if ('/' === mb_substr($v_header['filename'], mb_strlen($p_file_list[$i]), 1)) {
TrFctMessage(__FILE__, __LINE__, 3, '' . $v_header['filename'] . " is a file in $p_file_list[$i]");
$v_delete_file = true;
}
Function get_image_url
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function get_image_url()
{
// Get the image file path
if (!mb_strlen($this->path)) {
return $this->url;
- 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 _setErrorHandling
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected static function _setErrorHandling(
$object,
$mode = null,
$options = null
) {
- 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 PclTarHandleAddList
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function PclTarHandleAddList($p_tar, $p_list, $p_mode, &$p_list_detail, $p_add_dir, $p_remove_dir)
Avoid deeply nested control flow statements. Open
if ($helper->getConfig('album_tooltip_width') != $_POST['album_tooltip_width']) {
$criteria = new \CriteriaCompo();
$criteria->add($moduleIdCriteria);
$criteria->add(new \Criteria('conf_name', 'album_tooltip_width'));
/** @var \XoopsObject $config */
Avoid deeply nested control flow statements. Open
if (!isset($args[++$argIdx])) {
$msg = "Console_Getopt: option requires an argument --$opt";
return PEAR::raiseError($msg);
}
Avoid deeply nested control flow statements. Open
if (preg_match('/.*ttf/', mb_strtolower($f))) {
$fonts[] = $f;
}
Method PclTarHandleUpdate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function PclTarHandleUpdate($p_tarname, $p_file_list, &$p_list_detail, $p_tar_mode, $p_add_dir, $p_remove_dir)
Method setOrder
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function setOrder($bid, $title, $weight, $visible, $side, $bcachetime)
Function getList
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getList(CriteriaElement $criteria = null, $limit = 0, $start = 0)
{
$ret = [];
if (null === $criteria) {
$criteria = new CriteriaCompo();
- 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 imageMagickSupportType
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function imageMagickSupportType()
{
/** @var Extgallery\Helper $helper */
$helper = Extgallery\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 dskspace
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function dskspace($dir)
{
$s = stat($dir);
$space = $s[7];
if (is_dir($dir)) {
- 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"