Showing 691 of 1,163 total issues
Method adjustDate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function adjustDate(&$y, &$m, &$d, &$h, &$i, &$s)
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)
Method PclTarHandleExtractByIndexList
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$p_tarname,
$p_index_string,
&$p_list_detail,
$p_path,
$p_remove_path,
Function PclTarHandleExtension
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function PclTarHandleExtension($p_tarname)
{
TrFctStart(__FILE__, __LINE__, 'PclTarHandleExtension', "tar=$p_tarname");
// ----- Look for file extension
- 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 getSearchEvent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getSearchEvent($queryarray, $andor, $limit, $offset, $userId, $user)
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 addCatSelectCriteria
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function addCatSelectCriteria($criteria, $cats = null)
{
if (!\is_array($cats) && $cats > 0) {
$criteria->add(new \Criteria('cat_id', $cats));
}
- 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 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 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)
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)
Function getSearchEvent2
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getSearchEvent2($year, $month, $day, $cat, $searchExp, $andor, $orderBy)
{
global $xoopsDB, $xoopsUser;
if (isset($xoopsUser)) {
- 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 updateAll
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function updateAll($fieldname, $fieldvalue, \CriteriaElement $criteria = null, $force = false)
{
$setClause = $fieldname . ' = ';
if (\is_numeric($fieldvalue)) {
$setClause .= $fieldvalue;
- 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
Consider simplifying this complex logical expression. Open
if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
|| (sg && sg === this.slideshowGroup)) {
this.createOverlay(o);
}
Consider simplifying this complex logical expression. Open
if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
|| (sg && sg === this.slideshowGroup)) {
if (this.isImage || (this.isHtml && o.useOnHtml))
this.createOverlay(o);
}
Consider simplifying this complex logical expression. Open
if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
|| (sg && sg === this.slideshowGroup)) {
this.createOverlay(o);
}
Consider simplifying this complex logical expression. Open
if (($stamp1 >= $event['start'] && $stamp1 < $event['end'])
|| ($stamp2 >= $event['start']
&& $stamp2 < $event['end'])
|| ($stamp1 <= $event['start'] && $stamp2 > $event['end'])) {
$this->children[$i]->addEntry($event);
Function setPosition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
setPosition: function (pos, offset, vis, dur, easing) {
Function createElement
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
createElement: function (tag, attribs, styles, parent, nopad) {
Function createElement
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
createElement: function (tag, attribs, styles, parent, nopad) {
Function setPosition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
setPosition: function (pos, offset, vis, dur, easing) {