Showing 3,246 of 4,217 total issues

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

    function cache_memcached_connect($params = [])
    {
        global $memcache_obj, $CONF;
        if (isset($memcache_obj)) {
            return $memcache_obj;
Severity: Minor
Found in functions/yf_common_funcs.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

Avoid too many return statements within this method.
Open

            return [];

    Avoid too many return statements within this method.
    Open

                return _e('No locale var id');

      Avoid too many return statements within this method.
      Open

              return $FORCE_ID ? '' : js_redirect('./?object=' . $_GET['object'] . '&action=user_vars');

        Avoid too many return statements within this method.
        Open

                return $data;
        Severity: Major
        Found in plugins/assets/classes/yf_assets.class.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                                  return '(u.name ' . $like . ' OR u.nick ' . $like . ' OR u.login ' . $like . ' OR u.email ' . $like . ')';
          Severity: Major
          Found in plugins/payment/admin_modules/yf_manage_payment_operation.class.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                                return  $result;
            Severity: Major
            Found in plugins/payment/admin_modules/yf_manage_payment_operation.class.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return  $result;
              Severity: Major
              Found in plugins/payment/admin_modules/yf_manage_transfer.class.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return $this->get_asset_from_cdn($name, $_version, $data, $asset_type);
                Severity: Major
                Found in plugins/assets/classes/yf_assets.class.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                      return  $result;
                  Severity: Major
                  Found in plugins/payment/admin_modules/yf_manage_payment_operation.class.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                return  $this->_user_message($result);
                    Severity: Major
                    Found in plugins/payment/admin_modules/yf_manage_deposit.class.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                              return $vars;

                        Avoid too many return statements within this method.
                        Open

                                            return null;
                        Severity: Major
                        Found in plugins/assets/classes/yf_assets.class.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                  return $cache_path;
                          Severity: Major
                          Found in plugins/assets/classes/yf_assets.class.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                            return  $result;
                            Severity: Major
                            Found in plugins/payment/admin_modules/yf_manage_payment_operation.class.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                                      return '(o.title ' . $like . ' OR o.options ' . $like . ')';
                              Severity: Major
                              Found in plugins/payment/admin_modules/yf_manage_payment_operation.class.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                                    return  $result;
                                Severity: Major
                                Found in plugins/payment/admin_modules/yf_manage_payment_operation.class.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                              return 'o.operation_id = ' . (int) $v;
                                  Severity: Major
                                  Found in plugins/payment/admin_modules/yf_manage_deposit.class.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                                return 'o.operation_id = ' . (int) $v;
                                    Severity: Major
                                    Found in plugins/payment/admin_modules/yf_manage_payment_operation.class.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                  return  $this->_user_message($result);
                                      Severity: Major
                                      Found in plugins/payment/admin_modules/yf_manage_transfer.class.php - About 30 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language