Showing 3,246 of 4,217 total issues

Method date_box has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function date_box($selected = '', $years = '', $name_postfix = '', $add_str = '', $show_what = 'ymd', $show_text = 1, $translate = 1)
Severity: Major
Found in plugins/html/classes/html/yf_html_datetime.class.php - About 50 mins to fix

    Method date_box has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function date_box($selected = '', $years = '', $name_postfix = '', $add_str = '', $show_what = 'ymd', $show_text = 1, $translate = 1)
    Severity: Major
    Found in plugins/html/classes/yf_html.class.php - About 50 mins to fix

      Method date_box2 has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function date_box2($name, $selected = '', $years = '', $add_str = '', $show_what = 'ymd', $show_text = 1, $translate = 1)
      Severity: Major
      Found in plugins/html/classes/html/yf_html_datetime.class.php - About 50 mins to fix

        Method datetime_box2 has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function datetime_box2($name, $selected = '', $years = '', $add_str = '', $show_what = 'ymd', $show_text = 1, $translate = 1)
        Severity: Major
        Found in plugins/html/classes/yf_html.class.php - About 50 mins to fix

          Method del has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function del($name, $expire = 0, $path = null, $domain = null, $secure = null, $httponly = null, $params = [])
          Severity: Major
          Found in plugins/sys/classes/yf_cookie.class.php - About 50 mins to fix

            Method _cookie_set has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function _cookie_set($name, $value = '', $expire = 0, $path = null, $domain = null, $secure = null, $httponly = null)
            Severity: Major
            Found in plugins/auth/classes/auth/yf_auth_user.class.php - About 50 mins to fix

              Method _cookie_del has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public function _cookie_del($name, $value = '', $expire = 0, $path = null, $domain = null, $secure = null, $httponly = null)
              Severity: Major
              Found in plugins/auth/classes/auth/yf_auth_user.class.php - About 50 mins to fix

                Method insert_safe has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function insert_safe($table, $data, $only_sql = false, $replace = false, $ignore = false, $on_duplicate_key_update = false, $extra = [])
                Severity: Major
                Found in plugins/db/classes/yf_db.class.php - About 50 mins to fix

                  Method create_trigger has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public function create_trigger($name, $table, $trigger_time, $trigger_event, $trigger_body, $extra = [], &$error = false)
                  Severity: Major
                  Found in plugins/db/classes/db/yf_db_utils_driver.class.php - About 50 mins to fix

                    Method add_foreign_key has 7 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        public function add_foreign_key($table, $index_name = '', $fields = [], $ref_table = '', $ref_fields = [], $extra = [], &$error = false)
                    Severity: Major
                    Found in plugins/db/classes/db/yf_db_utils_driver.class.php - About 50 mins to fix

                      Method alter_foreign_key has 7 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          public function alter_foreign_key($table, $index_name = '', $fields = [], $ref_table = '', $ref_fields = [], $extra = [], &$error = false)
                      Severity: Major
                      Found in plugins/db/classes/db/yf_db_utils_driver.class.php - About 50 mins to fix

                        Method create_trigger has 7 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            public function create_trigger($name, $table, $trigger_time, $trigger_event, $trigger_body, $extra = [], &$error = false)
                        Severity: Major
                        Found in plugins/db/classes/db/yf_db_utils_pgsql.class.php - About 50 mins to fix

                          Method update_foreign_key has 7 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              public function update_foreign_key($table, $index_name = '', $fields = [], $ref_table = '', $ref_fields = [], $extra = [], &$error = false)
                          Severity: Major
                          Found in plugins/db/classes/db/yf_db_utils_driver.class.php - About 50 mins to fix

                            Method _send_email_to_user has 7 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                public function _send_email_to_user($user_id, $template_name, $data = [], $instant_send = true, $require_verified_email = false, $is_wall_update = true, $template_group = '')
                            Severity: Major
                            Found in plugins/email/classes/yf_email.class.php - About 50 mins to fix

                              Method date_box2 has 7 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  public function date_box2($name = '', $selected = '', $range = '', $add_str = '', $show_what = 'ymd', $show_text = 1, $translate = 1)
                              Severity: Major
                              Found in plugins/common/classes/yf_common.class.php - About 50 mins to fix

                                Method datetime_box2 has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    public function datetime_box2($name = '', $selected = '', $range = '', $add_str = '', $show_what = 'ymdhis', $show_text = 1, $translate = 1)
                                Severity: Major
                                Found in plugins/common/classes/yf_common.class.php - About 50 mins to fix

                                  Method insert has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      public function insert($table, $data, $only_sql = false, $replace = false, $ignore = false, $on_duplicate_key_update = false, $extra = [])
                                  Severity: Major
                                  Found in plugins/db/classes/yf_db.class.php - About 50 mins to fix

                                    Method date_box has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        public function date_box($selected_date = '', $years = '', $name_postfix = '', $add_str = '', $order = 'ymd', $show_text = 1, $translate = 1)
                                    Severity: Major
                                    Found in plugins/common/classes/yf_common.class.php - About 50 mins to fix

                                      Method radio_box has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

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

                                        Function _get_all_vars_from_files has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            public function _get_all_vars_from_files()
                                            {
                                                $vars = [];
                                                foreach ((array) $this->_cur_langs as $lang => $lang_name) {
                                                    list($lang_vars, $var_files) = $this->_get_vars_from_files($lang);
                                        Severity: Minor
                                        Found in plugins/locale/admin_modules/yf_locale_editor.class.php - About 45 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