Showing 3,246 of 4,217 total issues

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

    public function confirmation_code_check($options = null)
    {
        // import options
        is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
        // operation
Severity: Minor
Found in plugins/payment/classes/yf_payment_api.class.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 _api_response has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function _api_response($options)
    {
        // import options
        is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
        /*
Severity: Minor
Found in plugins/payment/classes/yf_payment_api__provider_bitpay.class.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 type has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function type($options = null)
    {
        // get type
        $type = $this->type;
        $type_index = $this->type_index;
Severity: Minor
Found in plugins/payment/classes/yf_payment_api.class.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 _payout_status_handler has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function _payout_status_handler($xml)
    {
        if ( ! $this->ENABLE) {
            return  null;
        }
Severity: Minor
Found in plugins/payment/classes/yf_payment_api__provider_webmoney.class.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 update has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function update($options = null)
    {
        // import options
        is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
        if ( ! @$_provider || ! @$_currency_rate) {
Severity: Minor
Found in plugins/payment/classes/yf_payment_api__currency.class.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 _operation_fetch has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function _operation_fetch($options = null)
    {
        // import options
        is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
        if (is_array($_data)) {
Severity: Minor
Found in plugins/payment/classes/yf_payment_api.class.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 _api_server has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function _api_server($request = null)
    {
        if ( ! $this->ENABLE) {
            return  null;
        }
Severity: Minor
Found in plugins/payment/classes/yf_payment_api__provider_liqpay.class.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 set has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function set($name, $value = null)
    {
        if (is_array($name)) {
            $func = __FUNCTION__;
            foreach ($name as $k => $v) {
Severity: Minor
Found in plugins/sys/classes/yf_model.class.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 signature has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function signature($options, $is_request = true)
    {
        $_ = &$options;
        $data = [];
        // add allow fields
Severity: Minor
Found in plugins/payment/classes/payment_provider/perfectmoney/PerfectMoney.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 download_item has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

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

    public function edit()
    {
        $_GET['id'] = (int) ($_GET['id']);
        // Do save data
        if ( ! empty($_POST)) {
Severity: Minor
Found in plugins/sys/admin_modules/yf_manage_advertising.class.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 upload_file has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function upload_file()
    {
        if ($_POST['verify']) {
            if ($_POST['name']) {
                $Name = $_POST['name'];
Severity: Minor
Found in plugins/sys/admin_modules/yf_file_manager.class.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 get_properties has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function get_properties($section = 'all')
    {
        $props = [];
        foreach ((array) $this->get_classes($section) as $_section => $modules) {
            foreach ((array) $modules as $module) {
Severity: Minor
Found in plugins/sys/classes/yf_core_api.class.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 signature has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function signature($options, $is_request = true)
    {
        $_ = &$options;
        $data = [];
        // add allow fields
Severity: Minor
Found in plugins/payment/classes/payment_provider/yandexmoney/YandexMoney.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 clone_menu has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function clone_menu()
    {
        $_GET['id'] = (int) ($_GET['id']);
        if (empty($_GET['id'])) {
            return _e('No id!');
Severity: Minor
Found in plugins/sys/admin_modules/yf_menus_editor.class.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 get_widgets has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function get_widgets($section = 'all', $prefix = 'widget__')
    {
        $prefix_len = strlen($prefix);
        $data = [];
        foreach ((array) $this->get_all_hooks($section) as $module => $_hooks) {
Severity: Minor
Found in plugins/sys/classes/yf_core_api.class.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 get_methods has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function get_methods($section = 'all')
    {
        $methods = [];
        foreach ((array) $this->get_classes($section) as $_section => $modules) {
            foreach ((array) $modules as $module) {
Severity: Minor
Found in plugins/sys/classes/yf_core_api.class.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 get_classes_by_params has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function get_classes_by_params($extra = [], &$paths = [])
    {
        $prefix = isset($extra['prefix']) ? $extra['prefix'] : YF_PREFIX;
        $suffix = isset($extra['suffix']) ? $extra['suffix'] : YF_CLS_EXT;
        $folder = isset($extra['folder']) ? $extra['folder'] : $this->section_paths['core'];
Severity: Minor
Found in plugins/sys/classes/yf_core_api.class.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 _process_var_filters has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function _process_var_filters($text = '', $filters = '')
    {
        if (is_string($filters) && strpos($filters, '|') !== false) {
            $filters = explode('|', $filters);
        }
Severity: Minor
Found in plugins/tpl/classes/yf_tpl.class.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 _login_with_prev_info has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function _login_with_prev_info()
    {
        $prev_info = $_SESSION['admin_prev_info'];
        if ( ! $prev_info || ! $prev_info[$this->VAR_ADMIN_ID] || ! $prev_info[$this->VAR_ADMIN_GROUP_ID]) {
            if ( ! empty($this->URL_WRONG_LOGIN)) {
Severity: Minor
Found in plugins/auth/classes/auth/yf_auth_admin.class.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

Severity
Category
Status
Source
Language