Showing 3,246 of 4,217 total issues

Method query_fetch_all has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function query_fetch_all($sql, $key_name = null, $use_cache = true)
    {
        if ( ! strlen($sql)) {
            return false;
        }
Severity: Minor
Found in plugins/db/classes/yf_db.class.php - About 1 hr to fix

    Method manufacturer_add has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function manufacturer_add()
        {
            if (main()->is_post()) {
                if ( ! $_POST['name']) {
                    _re('Product name must be filled');

      Method _init has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function _init()
          {
              $supplier = db()->get('SELECT supplier_id, main_cat_id FROM ' . db('shop_admin_to_supplier') . ' WHERE admin_id=' . (int) (main()->ADMIN_ID));
              if ($supplier['supplier_id']) {
                  $this->SUPPLIER_ID = $supplier['supplier_id'];
      Severity: Minor
      Found in plugins/shop/admin_modules/yf_manage_shop.class.php - About 1 hr to fix

        Method log_error has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function log_error($params = [])
            {
                if ( ! $this->LOG_ERRORS) {
                    return false;
                }
        Severity: Minor
        Found in classes/yf_csrf_guard.class.php - About 1 hr to fix

          Method test_select_complex has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function test_select_complex()
              {
                  if ($this->_need_skip_test(__FUNCTION__)) {
                      return;
                  }
          Severity: Minor
          Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

            Method test_where_like has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function test_where_like()
                {
                    if ($this->_need_skip_test(__FUNCTION__)) {
                        return;
                    }
            Severity: Minor
            Found in .dev/tests/unit/db/class_db_offline_query_builder_test.Test.php - About 1 hr to fix

              Method create has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function create()
                  {
                      @$replace = [] + $_POST;
                      $_this = $this;
                      $result = form($replace, ['autocomplete' => 'off'])
              Severity: Minor
              Found in plugins/payment/admin_modules/yf_manage_transfer.class.php - About 1 hr to fix

                Method _collect_vars_in_file has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function _collect_vars_in_file($file, $type, $params = [])
                    {
                        if ( ! $file) {
                            return [];
                        }

                  Method show has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function show()
                      {
                          $all_vars = $this->_get_all_vars();
                          $total_vars = count((array) $all_vars);
                          $tr_vars = [];
                  Severity: Minor
                  Found in plugins/locale/admin_modules/yf_locale_editor.class.php - About 1 hr to fix

                    Method menu has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function menu($data = [], $extra = [])
                        {
                            $extra['id'] = $extra['id'] ?: __FUNCTION__ . '_' . ++$this->_ids[__FUNCTION__];
                            if ($data) {
                                $data = $this->_recursive_sort_items($data);
                    Severity: Minor
                    Found in plugins/html/classes/yf_html.class.php - About 1 hr to fix

                      Method _api_response has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function _api_response()
                          {
                              if ( ! $this->ENABLE) {
                                  return  null;
                              }
                      Severity: Minor
                      Found in plugins/payment/classes/yf_payment_api__provider_privat24.class.php - About 1 hr to fix

                        Method _recursive_get_methods_from_extends has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function _recursive_get_methods_from_extends($file_text = '', $user_module_name = '', $_type = 'admin', $ONLY_PRIVATE_METHODS = false)
                            {
                                $extends_file_path = '';
                                $methods = [];
                                // TODO: connect plugins
                        Severity: Minor
                        Found in plugins/sys/classes/core_api/yf_core_api_admin_modules.class.php - About 1 hr to fix

                          Method _get_cke_config has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function _get_cke_config($params = [])
                              {
                                  asset('ckeditor-plugin-save');
                                  asset('ckeditor-plugin-autosave');
                                  asset('ckeditor-plugin-html5-video');
                          Severity: Minor
                          Found in plugins/sys/classes/yf_admin_methods.class.php - About 1 hr to fix

                            Method _track_geo_location has 46 lines of code (exceeds 25 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

                              Method _recursive_get_methods_from_extends has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function _recursive_get_methods_from_extends($file_text = '', $user_module_name = '', $_type = 'admin', $ONLY_PRIVATE_METHODS = false)
                                  {
                                      $extends_file_path = '';
                                      $methods = [];
                                      // TODO: connect plugins
                              Severity: Minor
                              Found in plugins/admin/admin_modules/yf_admin_modules.class.php - About 1 hr to fix

                                Method list_foreign_keys has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function list_foreign_keys($table, $extra = [], &$error = false)
                                    {
                                        if (is_array($table)) {
                                            $extra = (array) $extra + $table;
                                            $table = '';
                                Severity: Minor
                                Found in plugins/db/classes/db/yf_db_utils_driver.class.php - About 1 hr to fix

                                  Method _render_thead has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function _render_thead(&$params, &$a, &$to_hide)
                                      {
                                          $data = &$a['data'];
                                          $thead_attrs = '';
                                          if (isset($params['thead'])) {
                                  Severity: Minor
                                  Found in plugins/table2/classes/yf_table2.class.php - About 1 hr to fix

                                    Method _get_geo_data_from_db has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function _get_geo_data_from_db($cur_ip = '')
                                        {
                                            $cur_ip = trim(array_pop(explode(',', preg_replace("/[^0-9\.,]/i", '', $cur_ip))));
                                            if (empty($cur_ip)) {
                                                return false;
                                    Severity: Minor
                                    Found in plugins/common/classes/common/yf_other_common.class.php - About 1 hr to fix

                                      Method read_file has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function read_file($server_info = [], $remote_file = '', $local_file = '')
                                          {
                                              $local_file = trim($local_file);
                                              $remote_file = _class('ssh')->_prepare_path($remote_file);
                                              if ( ! _class('ssh')->_INIT_OK || ! $server_info || ! strlen($remote_file)) {
                                      Severity: Minor
                                      Found in plugins/ssh/classes/ssh/yf_ssh_files.class.php - About 1 hr to fix

                                        Method exec has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function exec($server_info = [], $cmd = '')
                                            {
                                                if ( ! $this->_INIT_OK || ! $cmd || ! $server_info) {
                                                    return false;
                                                }
                                        Severity: Minor
                                        Found in plugins/ssh/classes/yf_ssh.class.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language