Showing 3,246 of 4,217 total issues

Function _url_get_contents has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function _url_get_contents($url)
    {
        if ( ! strlen($url)) {
            return false;
        }
Severity: Minor
Found in plugins/assets/classes/yf_assets.class.php - About 1 hr 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 filters_get_avail has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function filters_get_avail()
    {
        if (isset($this->_avail_filters)) {
            return $this->_avail_filters;
        }
Severity: Minor
Found in plugins/assets/classes/yf_assets.class.php - About 1 hr 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 _save_csv has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function _save_csv($file_name, $data = null)
    {
        // setlocale( LC_ALL, 'ru_RU.utf8' )
        // || setlocale( LC_ALL, 'ru_UA.utf8' )
        // || setlocale( LC_ALL, 'en_US.utf8' );
Severity: Minor
Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr 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 transaction_start has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function transaction_start($options = null)
    {
        // import options
        is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
        $tx = &$this->transaction;
Severity: Minor
Found in plugins/payment/classes/yf_payment_api.class.php - About 1 hr 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 t has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function t(&$strs, $set = null, $level = 0)
    {
        if ($level > 1 || ! is_array($strs)) {
            return;
        }
Severity: Minor
Found in plugins/payment/modules/yf_payment.class.php - About 1 hr 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 _transaction has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    protected function _transaction($options)
    {
        if ( ! $this->ENABLE) {
            return  null;
        }
Severity: Minor
Found in plugins/payment/classes/yf_payment_api__provider.class.php - About 1 hr 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 api_request has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function api_request($options = null)
    {
        if ( ! $this->ENABLE) {
            return  null;
        }

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

    public function _form_options($options)
    {
        if ( ! $this->ENABLE) {
            return  null;
        }
Severity: Minor
Found in plugins/payment/classes/yf_payment_api__provider_ecommpay.class.php - About 1 hr 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 api_request has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function api_request($options = null)
    {
        if ( ! $this->ENABLE) {
            return  null;
        }

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

    public function _form_options($options)
    {
        if ( ! $this->ENABLE) {
            return  null;
        }
Severity: Minor
Found in plugins/payment/classes/yf_payment_api__provider_liqpay.class.php - About 1 hr 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 _pcntl_init has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public static function _pcntl_init($options = null)
    {
        if (is_console()) {
            // import options
            is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
Severity: Minor
Found in plugins/sys/classes/yf_pcntl_signal.class.php - About 1 hr 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 email_item has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function email_item()
    {
        $dir_name = urldecode($_POST['dir_name']);

        $_old_dir_name = str_replace('\\', '/', getcwd());
Severity: Minor
Found in plugins/sys/admin_modules/yf_file_manager.class.php - About 1 hr 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 delete_item has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function delete_item()
    {
        $dir_name = urldecode($_POST['dir_name']);
        foreach ((array) $_POST as $k => $v) {
            $file_name = str_replace('\\', '/', $dir_name . '/' . $v);
Severity: Minor
Found in plugins/sys/admin_modules/yf_file_manager.class.php - About 1 hr 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 api_request has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function api_request($options = null)
    {
        if ( ! $this->ENABLE) {
            return  null;
        }

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

    public function _parse_get_cached($name, array &$replace, $params = [], $string = false)
    {
        $force_storage = $params['force_storage'];
        if (isset($this->CACHE[$name]) && ! $params['no_cache'] && ! $force_storage) {
            $string = $this->CACHE[$name]['string'];
Severity: Minor
Found in plugins/tpl/classes/tpl/yf_tpl_driver_yf.class.php - About 1 hr 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 _do_login_with_encrypted has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function _do_login_with_encrypted()
    {
        header('X-Robots-Tag: noindex,nofollow,noarchive,nosnippet');
        if ( ! $_GET['id'] || strlen($_GET['id']) < 16 || is_numeric($_GET['id'])) {
            $this->_encrypted_error = 'GET_id is not like an encrypted string';
Severity: Minor
Found in plugins/auth/classes/auth/yf_auth_user.class.php - About 1 hr 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 _get_user_info has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function _get_user_info($login = '')
    {
        if (empty($login)) {
            return false;
        }
Severity: Minor
Found in plugins/auth/classes/auth/yf_auth_user.class.php - About 1 hr 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 _save_login_in_session has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function _save_login_in_session($user_info = [], $no_redirect_on_success = false)
    {
        if (empty($user_info['id'])) {
            return js_redirect($this->URL_WRONG_LOGIN);
        } elseif ($this->_is_user_inactive($user_info)) {
Severity: Minor
Found in plugins/auth/classes/auth/yf_auth_user.class.php - About 1 hr 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 _get_extra_override has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function _get_extra_override($form_id = '')
    {
        if ( ! strlen($form_id)) {
            return [];
        }
Severity: Minor
Found in plugins/form2/classes/yf_form2.class.php - About 1 hr 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 _compile_foreach has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function _compile_foreach($m)
    {
        $start = '<' . '?p' . 'hp ';
        $end = ' ?' . '>';

Severity: Minor
Found in plugins/tpl/classes/tpl/yf_tpl_driver_yf_compile.class.php - About 1 hr 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

Severity
Category
Status
Source
Language