Showing 197 of 242 total issues
Function errorName
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function errorName($p_with_code=false)
{
$v_const_list = get_defined_constants();
// ----- Extract error constants from all const.
- 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_clear_templates_c
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function altsys_clear_templates_c() {
$dh = opendir( XOOPS_COMPILE_PATH );
while ( $file = readdir( $dh ) ) {
if ( '.' == substr( $file, 0, 1 ) ) {
- 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 duplicate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function duplicate($p_archive)
{
$this->_errorReset();
// ----- Look if the $p_archive is a Archive_Zip object
- 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 _readFileHeader
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function _readFileHeader(&$p_header)
{
$v_result=1;
// ----- Read the 4 bytes signature
- 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
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function _check( $from_lines, $to_lines ) {
if ( serialize( $from_lines ) != serialize( $this->getOriginal() ) ) {
trigger_error( "Reconstructed original doesn't match", E_USER_ERROR );
}
if ( serialize( $to_lines ) != serialize( $this->getFinal() ) ) {
- 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_message_append_oninstall
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function altsys_message_append_oninstall( &$module_obj, &$log ) {
if ( is_array( @$GLOBALS['ret'] ) ) {
foreach ( $GLOBALS['ret'] as $message ) {
$log->add( strip_tags( $message ) );
}
- 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
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function init( $xoopsModule ) {
// altsys "module" MODE
if ( 'altsys' == $xoopsModule->getVar( 'dirname' ) ) {
// set target_module if specified by $_GET['dirname']
- 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_edit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function do_edit( $bid ) {
$bid = (int) $bid;
if ( $bid <= 0 ) {
// new custom block
- 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 list_blocks
has a Cognitive Complexity of 7 (exceeds 5 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";
- 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 isInstalledXclHtmleditor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function isInstalledXclHtmleditor(): bool
{
if (defined('LEGACY_BASE_VERSION') && version_compare(LEGACY_BASE_VERSION, '2.2', '>=')) {
$cNames = self::getDelegateCallbackClassNames('Site.TextareaEditor.HTML.Show');
if ($cNames) {
- 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 too many return
statements within this method. Open
return $v_result;
Avoid too many return
statements within this method. Open
return $v_result;
Avoid too many return
statements within this method. Open
return $v_result;
Avoid too many return
statements within this method. Open
return $v_result;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return $v_result;
Avoid too many return
statements within this method. Open
return $v_result;
Avoid too many return
statements within this method. Open
return $v_result;
Avoid too many return
statements within this method. Open
return $v_result;