Showing 60 of 60 total issues
Method myblocksadmin_update_blockinstance
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
function myblocksadmin_update_blockinstance($id, $bside, $bweight, $bvisible, $btitle, $bcontent, $bctype, $bcachetime, $bmodule, $options=array(), $bid=null)
Function myblocksadmin_update_blockinstance
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function myblocksadmin_update_blockinstance($id, $bside, $bweight, $bvisible, $btitle, $bcontent, $bctype, $bcachetime, $bmodule, $options=array(), $bid=null)
{
global $xoopsDB ;
$instance_handler =& xoops_gethandler('blockinstance');
- 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 myblocksadmin_update_block
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
function myblocksadmin_update_block($bid, $bside, $bweight, $bvisible, $btitle, $bcontent, $bctype, $bcachetime, $bmodule, $options=array())
Method draw_repost_form
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function draw_repost_form( $area = '' )
{
// Notify which file is broken
if ( headers_sent() ) {
restore_error_handler() ;
Method myblocksadmin_update_blockinstance
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function myblocksadmin_update_blockinstance($id, $bside, $bweight, $bvisible, $btitle, $bcontent, $bctype, $bcachetime, $bmodule, $options=array(), $bid=null)
{
global $xoopsDB ;
$instance_handler =& xoops_gethandler('blockinstance');
Method xtubeUpdateBlock
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
function xtubeUpdateBlock($bid, $btitle, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $boptions, $groups)
Method getAllPublished
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
static function getAllPublished($limit=0, $selected_stories=true, $start=0, $checkRight=false, $topic=0, $ihome=0, $asobject=true, $order = 'published', $topic_frontpage=false)
Function latest_news_is_admin_group
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function latest_news_is_admin_group()
{
global $xoopsUser;
$module_handler =& xoops_gethandler('module');
$xoopsModule =& $module_handler->getByDirname('news');
- 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 isBlockCloned
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
Avoid deeply nested control flow statements. Open
if ($counter > 4) {
$counter = 0;
echo "</tr>";
echo "<tr>";
}
Function XoopsGTicket
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function XoopsGTicket()
{
global $xoopsConfig ;
// language file
- 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
Avoid deeply nested control flow statements. Open
for ($j=0; $j < count($old_vals); $j++) {
$def_vals[$j] = $old_vals[$j];
}
Avoid deeply nested control flow statements. Open
if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) {
echo "<td class='$class' align='center' valign='bottom' width='19%'>";
echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n";
echo "</td>";
$counter++;
Method xtubeSetOrder
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function xtubeSetOrder($bid, $title, $weight, $visible, $side, $bcachetime)
Method makeMySelBox
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function makeMySelBox($title, $order = "", $preset_id = 0, $none = 0, $sel_name = "", $onchange = "")
Function issue
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function issue( $salt = '' , $timeout = 1800 , $area = '' )
{
global $xoopsModule ;
// create a token
- 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 admin_refcheck
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function admin_refcheck($chkref = "")
{
if ( empty( $_SERVER['HTTP_REFERER'] ) ) {
return true ;
} else {
- 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 getErrors
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function getErrors( $ashtml = true )
{
if ($ashtml) {
$ret = '' ;
foreach ($this->_errors as $msg) {
- 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 cloneBlock
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function cloneBlock($bid)
{
include_once dirname(__FILE__) . '/admin_header.php';
//include_once 'admin_header.php';
xoops_cp_header();
- 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 xtubeEditBlock
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function xtubeEditBlock($bid)
{
include_once dirname(__FILE__) . '/admin_header.php';
//include_once 'admin_header.php';
xoops_cp_header();
- 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"