Showing 3,246 of 4,217 total issues

Method select_box has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function select_box($name, $values = [], $selected = '', $show_text = true, $type = 2, $add_str = '', $translate = 0, $level = 0)
Severity: Major
Found in plugins/common/classes/yf_common.class.php - About 1 hr to fix

    Method multi_check_box has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function multi_check_box($box_name, $values = [], $selected = [], $horizontal = true, $type = 2, $add_str = '', $translate = 0, $name_as_array = false)
    Severity: Major
    Found in plugins/common/classes/yf_common.class.php - About 1 hr to fix

      Method divide_pages has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function divide_pages($sql = '', $url_path = '', $render_type = '', $records_on_page = 0, $num_records = 0, $tpls_path = '', $add_get_vars = 1, $extra = [])
      Severity: Major
      Found in plugins/common/classes/yf_common.class.php - About 1 hr to fix

        Method go_with_array has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function go_with_array($items_array = [], $url_path = '', $render_type = '', $records_on_page = 0, $num_records = 0, $tpls_path = '', $add_get_vars = 1, $extra = [])
        Severity: Major
        Found in plugins/common/classes/common/yf_divide_pages.class.php - About 1 hr to fix

          Method go has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function go($sql = '', $url_path = '', $render_type = '', $records_on_page = 0, $num_records = 0, $tpls_path = '', $add_get_vars = 1, $extra = [])
          Severity: Major
          Found in plugins/common/classes/common/yf_divide_pages.class.php - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

                        if ($action == 'update') {
                            ! ($exists && $many == 1) && $valid = false;
                            ! $exists && $status_message[] = 'не существует';
                            $many > 1 && $status_message[] = 'обнаружено множество элементов';
                        } elseif ($action == 'insert') {

              Method _execute has 8 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public function _execute($class_name = '', $method_name = '', $method_params = '', $tpl_name = '', $silent = false, $use_cache = false, $cache_ttl = -1, $cache_key_override = '')
              Severity: Major
              Found in classes/yf_main.class.php - About 1 hr to fix

                Method execute has 8 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function execute($class_name = '', $method_name = '', $method_params = '', $tpl_name = '', $silent = false, $use_cache = false, $cache_ttl = -1, $cache_key_override = '')
                Severity: Major
                Found in classes/yf_main.class.php - About 1 hr to fix

                  Method exec_cached has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public function exec_cached($class_name = '', $method_name = '', $method_params = '', $tpl_name = '', $silent = false, $use_cache = true, $cache_ttl = -1, $cache_key_override = '')
                  Severity: Major
                  Found in classes/yf_main.class.php - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                            if ( ! $this->QUICK_MENU_ENABLED
                                || (MAIN_TYPE_USER && ( ! isset($_SESSION['user_id']) || ! $_SESSION['user_id']))
                                || (MAIN_TYPE_ADMIN && ( ! isset($_SESSION['admin_id']) || ! $_SESSION['admin_id']))
                            ) {
                                return false;
                    Severity: Major
                    Found in classes/yf_graphics.class.php - About 1 hr to fix

                      Function get has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function get($name, $ttl = 0, $params = [])
                          {
                              if ( ! $this->is_ready()) {
                                  return null;
                              }
                      Severity: Minor
                      Found in plugins/memcached/classes/yf_wrapper_memcached.class.php - About 55 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 form_dd_row has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function form_dd_row($content, $extra = [], $replace = [], $form)
                          {
                              $dd_class = $form->_params['dd_class'] ?: 'span6';
                      
                              $class_wrapper = $extra['class_wrapper'] ?: 'dl-horizontal';
                      Severity: Minor
                      Found in plugins/html/classes/html5fw/yf_html5fw_bs3.class.php - About 55 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 has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function __clone()
                          {
                              $keep_prefix = 'CLASS_';
                              $keep_len = strlen($keep_prefix);
                              $keep_prefix2 = 'CONF_';
                      Severity: Minor
                      Found in plugins/html/classes/yf_html.class.php - About 55 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 icon has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function icon()
                          {
                              $args = func_get_args();
                              $a = [];
                              // numerics params
                      Severity: Minor
                      Found in plugins/html/classes/yf_html.class.php - About 55 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 filters_process_added has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function filters_process_added($asset_type, $params = [])
                          {
                              if ( ! $asset_type) {
                                  return false;
                              }
                      Severity: Minor
                      Found in plugins/assets/classes/yf_assets.class.php - About 55 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 load_predefined_assets has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function load_predefined_assets($force = false)
                          {
                              // Cleanup previously filled assets
                              if ($force) {
                                  $this->assets = [];
                      Severity: Minor
                      Found in plugins/assets/classes/yf_assets.class.php - About 55 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 view has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function view()
                          {
                              // check operation
                              $operation = $this->_operation();
                              // import options
                      Severity: Minor
                      Found in plugins/payment/admin_modules/yf_manage_deposit.class.php - About 55 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 _form has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

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

                          protected function _currency_rate_load($options = null)
                          {
                              // import options
                              is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                              // var
                      Severity: Minor
                      Found in plugins/payment/modules/yf_payment_test.class.php - About 55 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 _form has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function _form($data, $options = null)
                          {
                              if ( ! $this->ENABLE) {
                                  return  null;
                              }
                      Severity: Minor
                      Found in plugins/payment/classes/yf_payment_api__provider_perfectmoney.class.php - About 55 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