Showing 197 of 242 total issues
Method renderCell4BlockPosition
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function renderCell4BlockPosition( $block_data ) {
$bid = (int) $block_data['bid'];
$side = (int) $block_data['side'];
$visible = (int) $block_data['visible'];
Function _tool_PathInclusion
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function _tool_PathInclusion($p_dir, $p_path)
{
$v_result = 1;
// ----- Explode dir and path by directory separator
- 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_admin_in_theme_in_last
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function altsys_admin_in_theme_in_last( $contents = null ) {
global $xoops_admin_contents, $xoopsConfig, $xoopsModule, $xoopsUser, $xoopsUserIsAdmin, $xoopsLogger, $altsysModuleConfig, $altsysModuleId;
if ( ! isset( $contents ) ) {
while ( ob_get_level() ) {
Method list_blocks
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function list_blocks() {
global $xoopsGTicket;
// main query
$sql = 'SELECT * FROM ' . $this->db->prefix( 'newblocks' ) . " WHERE mid='$this->target_mid' ORDER BY visible DESC,side,weight";
Method check
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function check(bool $post = true, string $area = '', bool $allow_repost = true ) {
global $xoopsModule;
$this->_errors = [];
Method render
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render() {
global $xoopsGTicket;
// load all child ids for javascript codes
foreach ( array_keys( $this->_itemTree ) as $item_id ) {
Method altsys_onupdate_base
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function altsys_onupdate_base( $module, $mydirname ) {
// transactions on module update
global $msgs; // TODO :-D
Method update_block
has 50 lines of code (exceeds 25 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' ) ) {
Method read
has 50 lines of code (exceeds 25 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)) {
Function altsys_mylangadmin_get_constant_names
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function altsys_mylangadmin_get_constant_names( $langfile_unique_path, $mydirname ) {
$constpref = '';
$langfile_names = [];
- 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 _add
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _add($p_list, &$p_result_list, &$p_params)
{
$v_result=1;
$v_list_detail = [];
- 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 _addFileList
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _addFileList($p_list, &$p_result_list,
$p_add_dir, $p_remove_dir, $p_remove_all_dir,
&$p_params)
{
$v_result=1;
Method _readCentralFileHeader
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _readCentralFileHeader(&$p_header)
{
$v_result=1;
// ----- Read the 4 bytes signature
Method render
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render( $diff ) {
$xi = $yi = 1;
$block = false;
$context = [];
Function tplsadmin_get_basefilepath
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function tplsadmin_get_basefilepath( $dirname, $type, $tpl_file ) {
// module instance
$path = $basefilepath = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/templates/' . ( 'block' == $type ? 'blocks/' : '' ) . $tpl_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
Function extract_post_recursive
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function extract_post_recursive( $key_name, $tmp_array ) {
$table = '';
$form = '';
- 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_admin_in_theme_in_last
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function altsys_admin_in_theme_in_last( $contents = null ) {
global $xoops_admin_contents, $xoopsConfig, $xoopsModule, $xoopsUser, $xoopsUserIsAdmin, $xoopsLogger, $altsysModuleConfig, $altsysModuleId;
if ( ! isset( $contents ) ) {
while ( ob_get_level() ) {
- 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 _check_parameters
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function _check_parameters(&$p_params, $p_default)
{
// ----- Check that param is an array
if (!is_array($p_params)) {
- 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 _compareseq
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function _compareseq( $xoff, $xlim, $yoff, $ylim ) {
/* Slide down the bottom initial diagonal. */
while ( $xoff < $xlim && $yoff < $ylim
&& $this->xv[ $xoff ] == $this->yv[ $yoff ] ) {
++ $xoff;
- 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 _readFileHeader
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _readFileHeader(&$p_header)
{
$v_result=1;
// ----- Read the 4 bytes signature