Showing 197 of 242 total issues
Method b_altsys_admin_menu_show
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_altsys_admin_menu_show($options)
{
global $xoopsUser;
$mydirname = empty($options[0]) ? 'altsys' : $options[0];
Function render
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function render( $diff ) {
$xi = $yi = 1;
$block = false;
$context = [];
- 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 _extractFile
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _extractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_params)
{
$v_result=1;
// ----- Read the file header
Method triggerEvent
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function triggerEvent($mydirname, $mytrustdirname, $category, $item_id, $event, array $extra_tags = [], array $user_list = [], $omit_user_id = null)
{
$module_handler =& xoops_gethandler('module');
$module =& $module_handler->getByDirname($mydirname);
Method form_edit
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function form_edit( $bid, $mode = 'edit' ) {
$bid = (int) $bid;
//HACK by domifara
if ( defined( 'XOOPS_CUBE_LEGACY' ) ) {
Function altsys_onuninstall_base
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
function altsys_onuninstall_base($module, $mydirname)
{
// transations on module uninstall
global $ret; // TODO :-D
- 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 update_block
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function update_block( $bid, $bside, $bweight, $bvisible, $btitle, $bcontent, $bctype, $bcachetime, $options = [] ) {
global $xoopsConfig;
//HACK by domifara
if ( defined( 'XOOPS_CUBE_LEGACY' ) ) {
- 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 _merge
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _merge(&$p_archive_to_add)
{
$v_result=1;
// ----- Look if the archive_to_add exists
MyBlocksAdmin
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
class MyBlocksAdmin {
public $db;
public $lang;
Function read
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function read($resource, $mydirname, $mytrustdirname = null, bool $read_once = true)
{
$d3file = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/mytrustdirname.php';
if (empty($mytrustdirname) && is_file($d3file)) {
- 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 update
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function update()
{
$db =& XoopsDatabaseFactory::getDatabaseConnection();
// search appropriate column for getting primary_key
- 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 _add
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _add($p_list, &$p_result_list, &$p_params)
{
$v_result=1;
$v_list_detail = [];
Function _readEndCentralDir
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function _readEndCentralDir(&$p_central_dir)
{
$v_result=1;
// ----- Go to the end of the zip 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
Method _readEndCentralDir
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _readEndCentralDir(&$p_central_dir)
{
$v_result=1;
// ----- Go to the end of the zip file
Method altsys_oninstall_base
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
function altsys_oninstall_base( $module, $mydirname ) {
// transactions on module install
global $ret; // TODO :-D
Function draw_repost_form
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function draw_repost_form(string $area = '' ) {
// Notify which file is broken
if ( headers_sent() ) {
restore_error_handler();
- 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 diff
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function diff( $from_lines, $to_lines ) {
$n_from = count( $from_lines );
$n_to = count( $to_lines );
$this->xchanged = $this->ychanged = [];
Function triggerEvent
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function triggerEvent($mydirname, $mytrustdirname, $category, $item_id, $event, array $extra_tags = [], array $user_list = [], $omit_user_id = null)
{
$module_handler =& xoops_gethandler('module');
$module =& $module_handler->getByDirname($mydirname);
- 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 _shiftBoundaries
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _shiftBoundaries( $lines, &$changed, $other_changed ) {
$i = 0;
$j = 0;
assert( count( $lines ) == count( $changed ) );
Method _diag
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _diag( $xoff, $xlim, $yoff, $ylim, $nchunks ) {
$flip = false;
if ( $xlim - $xoff > $ylim - $yoff ) {
/* Things seems faster (I'm not sure I understand why) when the