Showing 115 of 162 total issues
File MyBlocksAdmin.class.php
has 779 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Altsys library (UI-Components) Admin blocks and permissions
* Class MyBlocksAdmin
* @package Altsys
Function altsys_oninstall_base
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
function altsys_oninstall_base( $module, $mydirname ) {
$pieces = null;
// transactions on module install
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
File Text_Diff.php
has 463 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @brief XCL/PHP7 @gigamaster replace 'each' (deprecated) with foreach
*
* Text_Diff
Function check
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public function check(bool $post = true, string $area = '', bool $allow_repost = true ) {
global $xoopsModule;
$this->_errors = [];
- 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 _shiftBoundaries
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function _shiftBoundaries( $lines, &$changed, $other_changed ) {
$i = 0;
$j = 0;
assert( (is_countable($lines) ? count( $lines ) : 0) == count( $changed ) );
- 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 _diag
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public function _diag( $xoff, $xlim, $yoff, $ylim, $nchunks ) {
$ymatches = [];
$ymids = [];
$seps = [];
$flip = false;
- 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 diff
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function diff( $from_lines, $to_lines ) {
$xhash = [];
$yhash = [];
$n_from = is_countable($from_lines) ? count( $from_lines ) : 0;
$n_to = is_countable($to_lines) ? count( $to_lines ) : 0;
- 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 b_altsys_admin_menu_show
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
function b_altsys_admin_menu_show($options)
{
$ret = [];
global $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 altsys_onupdate_base
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function altsys_onupdate_base( $module, $mydirname ) {
// transactions on module update
global $msgs; // 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
File mytplsadmin.php
has 350 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Altsys library (UI-Components)
* Admin Templates for each module
* @package Altsys
Method b_altsys_admin_menu_show
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_altsys_admin_menu_show($options)
{
$ret = [];
global $xoopsUser;
Function render
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function render( $diff ) {
$x0 = null;
$y0 = null;
$xi = $yi = 1;
$block = false;
- 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 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 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
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
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 altsys_oninstall_base
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
function altsys_oninstall_base( $module, $mydirname ) {
$pieces = null;
// transactions on module install
global $ret; // TODO :-D