Showing 3,246 of 4,217 total issues

Function get_currency_payout has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

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

    public function mass_payout($options = null)
    {
        $operation_id = $this->_get_operation_id($options);
        is_numeric($operation_id) && $operation_id = [$operation_id => 1];
        if ( ! is_array($operation_id)) {
Severity: Minor
Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 25 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 mass_cancel has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function mass_cancel($options = null)
    {
        $operation_id = $this->_get_operation_id($options);
        is_numeric($operation_id) && $operation_id = [$operation_id => 1];
        if ( ! is_array($operation_id)) {
Severity: Minor
Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 25 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_check has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

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

    public function _xml_add(&$xml, $items)
    {
        if ( ! (@$xml instanceof SimpleXMLElement) || ! @$items) {
            return  null;
        }
Severity: Minor
Found in plugins/payment/classes/yf_payment_api__provider_webmoney.class.php - About 25 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 decrypt has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function decrypt($data, $secret = null, $cipher = null, $iv)
    {
        if ( ! $iv) {
            return false;
        }
Severity: Minor
Found in plugins/sys/classes/yf_encryption.class.php - About 25 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 _count_levels has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function _count_levels($start_id = 0, &$children, $level = 0)
    {
        $ids = [];
        foreach ((array) $children[$start_id] as $id => $_tmp) {
            $ids[$id] = $level;
Severity: Minor
Found in plugins/sys/admin_modules/yf_menus_editor.class.php - About 25 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 _count_levels has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function _count_levels($start_id = 0, &$children, $level = 0)
    {
        $ids = [];
        foreach ((array) $children[$start_id] as $id => $_tmp) {
            $ids[$id] = $level;
Severity: Minor
Found in plugins/sys/classes/yf_core_menu.class.php - About 25 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_hooks has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function get_hooks($hook_name, $section = 'all')
    {
        $hooks = [];
        foreach ((array) $this->get_all_hooks($section) as $module => $_hooks) {
            foreach ((array) $_hooks as $name => $method_name) {
Severity: Minor
Found in plugins/sys/classes/yf_core_api.class.php - About 25 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 _init has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

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

    public function _show_dropdown_menu()
    {
        $items = _class('graphics')->_show_menu([
            'name' => 'admin_home_menu',
            'force_stpl_name' => 'site_nav_bar/dropdown_menu',
Severity: Minor
Found in plugins/site_nav_bar/admin_modules/yf_site_nav_bar.class.php - About 25 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 chmod_item has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function chmod_item()
    {
        $dir_name = urldecode($_POST['dir_name']);
        if ( ! $_POST['new_chmod']) {
            $_POST['new_chmod'] = '755';
Severity: Minor
Found in plugins/sys/admin_modules/yf_file_manager.class.php - About 25 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_menu_items has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function _get_menu_items($cur_menu_info)
    {
        $menu_id = $cur_menu_info['id'];
        $menu_name = $cur_menu_info['name'];
        if ( ! isset($this->_menu_items)) {
Severity: Minor
Found in plugins/sys/classes/yf_core_menu.class.php - About 25 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 find_hooks has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function find_hooks($hook_name, $section = 'all')
    {
        $hooks = [];
        foreach ((array) $this->find_all_hooks($section) as $module => $_hooks) {
            foreach ((array) $_hooks as $name => $method_name) {
Severity: Minor
Found in plugins/sys/classes/yf_admin_methods.class.php - About 25 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_request_send has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

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

    public function api_request__X_fields(&$data, &$fields, $options)
    {
        foreach ($fields as $field) {
            if (isset($options[$field])) {
                $data[$field] = $options[$field];
Severity: Minor
Found in plugins/payment/classes/yf_payment_api__provider_webmoney.class.php - About 25 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 deposition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

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

    public function api_request__checkout_b($options = null)
    {
        // get business account_id
        list($status, $account) = $this->api_request('account');
        if (empty($status)
Severity: Minor
Found in plugins/payment/classes/yf_payment_api__provider_interkassa.class.php - About 25 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_center_block_id has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function _get_center_block_id()
    {
        if ( ! isset($this->_blocks_infos)) {
            $this->_blocks_infos = main()->get_data('blocks_all');
        }
Severity: Minor
Found in plugins/sys/classes/yf_core_blocks.class.php - About 25 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 _pcntl_log has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static function _pcntl_log($options = null, $type = null)
    {
        // import options
        is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
        // message
Severity: Minor
Found in plugins/sys/classes/yf_pcntl_signal.class.php - About 25 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