Showing 4,217 of 4,217 total issues

Function _operation has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

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

    public function interkassa_detect_card($options = null)
    {
        // import options
        is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
        if (empty($_card)) {
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 _api_response has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

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

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

    public function _form_options($options)
    {
        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 load_rate has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

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

    protected function _api_Interkassa($title)
    {
        $php = '';
        $api = _class('payment_api__provider_interkassa');
        $methods = [
Severity: Minor
Found in plugins/payment/modules/yf_payment_test.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 active has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function active($params = [])
    {
        if (is_string($params)) {
            $params = [
                'table' => $params,
Severity: Minor
Found in plugins/sys/classes/yf_admin_methods.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 clone_item has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function clone_item($params = [])
    {
        if (is_string($params)) {
            $params = [
                'table' => $params,
Severity: Minor
Found in plugins/sys/classes/yf_admin_methods.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_signal_init has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public static function _pcntl_signal_init($options = null)
    {
        if (is_console()) {
            self::_pcntl_init($options);
            $is_ttl = &self::$_pcntl_is_ttl;
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 view_item has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function view_item()
    {
        if ( ! empty($_GET['id'])) {
            $file_name = urldecode($_GET['id']);
            $file_path = $file_name;
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 _get_denied_tasks_names has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function _get_denied_tasks_names()
    {
        $cache = 'cache_' . __FUNCTION__;
        if (isset($this->$cache)) {
            return $this->$cache;
Severity: Minor
Found in plugins/sys/classes/yf_core_blocks.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 add_item has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function add_item()
    {
        $menu_info = db()->get('SELECT * FROM ' . db('menus') . ' WHERE id=' . (int) ($_GET['id']));
        if (empty($menu_info['id'])) {
            return _e('No such menu!');
Severity: Minor
Found in plugins/sys/admin_modules/yf_menus_editor.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 _track_geo_location has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function _track_geo_location()
    {
        if ( ! $this->TRACK_GEO_LOCATION || ! main()->USE_GEO_IP) {
            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 tbl_link_active has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function tbl_link_active($name = '', $link = '', $extra = [], $replace = [], $form)
    {
        if (is_array($name)) {
            $extra = (array) $extra + $name;
            $name = $extra['name'];
Severity: Minor
Found in plugins/form2/classes/form2/yf_form2_tbl_funcs.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 _show_themes has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function _show_themes()
    {
        $themes = $this->_get_themes();

        $num_stpls_array = cache_get($this->CACHE_NAME, 60);
Severity: Minor
Found in plugins/tpl/admin_modules/yf_template_editor.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_plugins has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function get_plugins()
    {
        $folder = '';
        $suffix = '/';
        $libs = [];
Severity: Minor
Found in plugins/sys/classes/yf_core_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 _field_type has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function _field_type($type = '')
    {
        $type = trim(strtolower($type));
        if (strpos($type, 'int') !== false) {
            $type = 'int';
Severity: Minor
Found in plugins/form2/classes/form2/yf_form2_auto.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 create_table has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function create_table($table_name, $db)
    {
        $table_found = false;
        if (empty($table_name)) {
            return false;
Severity: Minor
Found in plugins/db/classes/db/yf_db_installer.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 _send_http_status has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    protected function _send_http_status($code = null, $status = null)
    {
        $code = (int) $code;
        $protocol = null;
        $status = null;
Severity: Minor
Found in plugins/api/classes/yf_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

Severity
Category
Status
Source
Language