Showing 242 of 242 total issues
Method _renderOptionTree
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _renderOptionTree( &$tree, $option, $prefix, $parentIds = [] ) {
$tree .= $prefix . '<input type="checkbox" name="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" id="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" onclick="';
// If there are parent elements, add javascript that will
// make them selected when this element is checked to make
// sure permissions to parent items are added as well.
Method add
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function add($p_filelist, $p_params=0)
{
$this->_errorReset();
// ----- Set default values
Method _check_parameters
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _check_parameters(&$p_params, $p_default)
{
// ----- Check that param is an array
if (!is_array($p_params)) {
Method update
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function update()
{
$db =& XoopsDatabaseFactory::getDatabaseConnection();
// search appropriate column for getting primary_key
Function _dirCheck
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function _dirCheck($p_dir, $p_is_dir=false)
{
$v_result = 1;
// ----- Remove the final '/'
- 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 do_clone
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function do_clone( $bid ) {
$bid = (int) $bid;
$request = $this->fetchRequest4Block( $bid );
- 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 _loadLanguage
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function _loadLanguage( $dirname, $fileBodyName ) {
// read/check once (selected_theme)/language/(lang).php
if ( ! $this->theme_lang_checked ) {
$root = XCube_Root::getSingleton();
- 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 canClone
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function canClone( $block ) {
// can clone link if it is marked as cloneable block
if ( 'D' == $block->getVar( 'block_type' ) || 'C' == $block->getVar( 'block_type' ) ) {
return 2;
}
- 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 init_default_values
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function init_default_values(): int
{
$db =& XoopsDatabaseFactory::getDatabaseConnection();
if (@$_GET['id']) {
- 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 insert
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function insert()
{
$db =& XoopsDatabaseFactory::getDatabaseConnection();
$id = $this->init_default_values();
- 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 renderCell4BlockReadGroupPerm
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function renderCell4BlockReadGroupPerm( $block_data ) {
$bid = (int) $block_data['bid'];
// get selected targets
if ( is_array( @$block_data['bgroup'] ) ) {
- 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 create
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function create($p_filelist, $p_params=0)
{
$this->_errorReset();
// ----- Set default values
Method _compareseq
has 31 lines of code (exceeds 25 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;
Method smarty_resource_db_tplinfo
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smarty_resource_db_tplinfo( $tpl_name ) {
static $cache = [];
global $xoopsConfig;
if ( isset( $cache[ $tpl_name ] ) ) {
Method extract
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function extract($p_params=0)
{
$this->_errorReset();
// ----- Check archive
Method delete
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function delete($p_params)
{
$this->_errorReset();
// ----- Check archive
Method altsys_onuninstall_base
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function altsys_onuninstall_base($module, $mydirname)
{
// transations on module uninstall
global $ret; // TODO :-D
Method issue
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function issue(string $salt = '', int $timeout = 1800, string $area = '' ) {
global $xoopsModule;
if ( '' === $salt ) {
if ( version_compare( PHP_VERSION, '7.0.0' ) >= 0 && function_exists( 'random_bytes' ) ) {
Method altsys_admin_in_theme
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function altsys_admin_in_theme( $s ) {
global $xoops_admin_contents;
$xoops_admin_contents = '';
Method update_block
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
public function update_block( $bid, $bside, $bweight, $bvisible, $btitle, $bcontent, $bctype, $bcachetime, $options = [] ) {