ImpressCMS/impresscms

View on GitHub

Showing 47,251 of 47,256 total issues

Function issue has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        function issue($salt = '', $timeout = 1800, $area = '') {
            global $xoopsModule;

            // create a token
            list($usec, $sec) = explode(" ", microtime());

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 replace_doubtful has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function replace_doubtful($key, $val) {
        $index_expression = '';
        $indexes = explode('_', $key);
        $base_array = array_shift($indexes);

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 getModulesArray has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function getModulesArray($full = false) {
        if (!is_array($this->modules_name) || !count($this->modules_name)) {
            $icms_module_handler = icms::handler('icms_module');
            $installed_modules = &$icms_module_handler->getObjects();
            foreach ($installed_modules as $module) {
Severity: Minor
Found in htdocs/modules/system/admin/pages/class/pages.php - About 35 mins to fix

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_system_social_show has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function b_system_social_show($options) {
    $block = array();
    $block['provider'] = array();

    $i = 0;
Severity: Minor
Found in htdocs/modules/system/blocks/system_blocks.php - About 35 mins to fix

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

Space found before comma in function call
Open

                , $content);

Visibility must be declared on method "readConstant"
Open

    function readConstant() {

Visibility must be declared on method "__construct"
Open

    function __construct() {}

Visibility must be declared on method "makeTareaData4Edit"
Open

    function makeTareaData4Edit($text) {

Visibility must be declared on method "oopsStripSlashesGPC"
Open

    function &oopsStripSlashesGPC($text) {

Tabs must be used to indent lines; spaces are not allowed
Open

     'de','dj','dk','dm','do','dz','ec','ee','eg','er','es','et','eu','fi','fj','fk','fm','fo',

Tabs must be used to indent lines; spaces are not allowed
Open

     'gy','hk','hm','hn','hr','ht','hu','id','ie','il','im','in','io','iq','ir','is','it','je',

Expected 1 space after comma in function call; 2 found
Open

define( "DB_CHARSET_HELP",  "MySQL includes character set support that enables you to store data using a variety of character sets and perform comparisons according to a variety of collations.");

Opening brace should be on the same line as the declaration
Open

    {

Tabs must be used to indent lines; spaces are not allowed
Open

        'create'    => TABLE_CREATED,

Expected "function abc(...)"; found "function abc(...)"
Open

    function  __construct() {

Space found before comma in function call
Open

                , "define('".$key."', '". str_replace( '$', '\$', addslashes( $val ) ) ."')"

The var keyword must not be used to declare a property
Open

    var $dbuname;

Visibility must be declared on property "$dbuname"
Open

    var $dbuname;

The var keyword must not be used to declare a property
Open

    var $root_path;

The var keyword must not be used to declare a property
Open

    var $xoops_url;
Severity
Category
Status
Source
Language