Showing 3,246 of 4,217 total issues

Method increment has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function increment($field, $step = 1, $as_sql = false)
    {
        if ( ! $field) {
            return false;
        }
Severity: Minor
Found in plugins/db/classes/db/yf_db_query_builder_driver.class.php - About 1 hr to fix

    Method apply has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function apply($name, $params = [])
        {
            if (is_array($name)) {
                $params = (array) $params + $name;
                $name = '';
    Severity: Minor
    Found in plugins/db/classes/db/yf_db_migrator.class.php - About 1 hr to fix

      Method insert has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function insert($table, $data, $only_sql = false, $replace = false, $ignore = false, $on_duplicate_key_update = false, $extra = [])
          {
              if ($this->DB_REPLICATION_SLAVE && ! $only_sql) {
                  return false;
              }
      Severity: Minor
      Found in plugins/db/classes/yf_db.class.php - About 1 hr to fix

        Method _validate_url_by_http has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function _validate_url_by_http($url)
            {
                if (empty($url)) {
                    return false;
                }
        Severity: Minor
        Found in plugins/common/classes/common/yf_remote_files.class.php - About 1 hr to fix

          Method _get_oauth_header has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function _get_oauth_header($url, $params, $method = 'POST', $oauth_token_secret = '', $add_to_sign = [])
              {
                  if ( ! is_array($params)) {
                      $params = [];
                  }
          Severity: Minor
          Found in plugins/oauth/classes/oauth/yf_oauth_driver1.class.php - About 1 hr to fix

            Method bs_current_theme has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function bs_current_theme($main_type = '', $force = false)
                {
                    if ( ! $main_type) {
                        $main_type = MAIN_TYPE;
                    }
            Severity: Minor
            Found in plugins/common/classes/yf_common.class.php - About 1 hr to fix

              Method _display_preview has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function _display_preview($params = [], $template = '')
                  {
                      $replace = $params['replace'];
                      $PARENT_OBJECT = $_REQUEST['parent_object'];
                      $PARENT_ACTION = $_REQUEST['parent_action'];
              Severity: Minor
              Found in plugins/common/classes/common/yf_preview.class.php - About 1 hr to fix

                Method get_total_records has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function get_total_records($sql = '', $num_records = 0, $extra = [])
                    {
                        $sql_callback = $extra['sql_callback'];
                        if (is_array($sql)) {
                            $total_records = count((array) $sql);
                Severity: Minor
                Found in plugins/common/classes/common/yf_divide_pages.class.php - About 1 hr to fix

                  Method get_user_info has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function get_user_info()
                      {
                          $access_token = $this->_storage_get('access_token');
                          if ( ! $access_token) {
                              $access_token = $this->get_access_token();
                  Severity: Minor
                  Found in plugins/oauth/classes/oauth/yf_oauth_driver_odnoklassniki.class.php - About 1 hr to fix

                    Method _get_conf has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function _get_conf($key = null, array $options = [])
                        {
                            // lower
                            $k = strtolower($key);
                            if ( ! isset($this->config_default[$k])) {
                    Severity: Minor
                    Found in plugins/redis/classes/yf_wrapper_redis.class.php - About 1 hr to fix

                      Method _prepare_for_box has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function _prepare_for_box($cat_items = [], $with_all = true, $parent_item_id = 0, $all = false)
                          {
                              if ( ! empty($cat_items) && is_string($cat_items)) {
                                  $cat_items = $this->_get_items_array($cat_items);
                              }
                      Severity: Minor
                      Found in plugins/categories/classes/yf_cats.class.php - About 1 hr to fix

                        Method show_friend_stats has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function show_friend_stats()
                            {
                                if (empty(main()->USER_ID)) {
                                    return _error_need_login();
                                }
                        Severity: Minor
                        Found in plugins/user/modules/yf_user_profile.class.php - About 1 hr to fix

                          Method basket_add has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function basket_add()
                              {
                                  $product = db()->query_fetch('SELECT id FROM ' . db('shop_products') . " WHERE active = '1' AND " . (is_numeric($_GET['id']) ? 'id=' . (int) ($_GET['id']) : "url='" . _es($_GET['id']) . "'"));
                                  if ( ! empty($product)) {
                                      $_GET['id'] = $product['id'];
                          Severity: Minor
                          Found in plugins/shop/modules/shop/yf_shop_basket_add.class.php - About 1 hr to fix

                            Method init_files has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function init_files()
                                {
                                    $this->PROFILING && $this->_timing[] = [microtime(true), __CLASS__, __FUNCTION__, $this->trace_string(), func_get_args()];
                                    $include_files = [];
                                    $required_files = [];
                            Severity: Minor
                            Found in classes/yf_main.class.php - About 1 hr to fix

                              Method _save_log has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

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

                                Method init_auth has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function init_auth()
                                    {
                                        $this->PROFILING && $this->_timing[] = [microtime(true), __CLASS__, __FUNCTION__, $this->trace_string(), func_get_args()];
                                        $this->events->fire('main.before_auth');
                                        if (defined('SITE_DEFAULT_PAGE')) {
                                Severity: Minor
                                Found in classes/yf_main.class.php - About 1 hr to fix

                                  Method chart_bar_flash has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function chart_bar_flash($data, $params)
                                      {
                                          if (empty($data)) {
                                              return;
                                          }
                                  Severity: Minor
                                  Found in plugins/charts/classes/yf_charts.class.php - About 1 hr to fix

                                    Method tail has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function tail($file, $lines = 10)
                                        {
                                            if ( ! $file || ! file_exists($file)) {
                                                return false;
                                            }
                                    Severity: Minor
                                    Found in classes/yf_dir.class.php - About 1 hr to fix

                                      Method _replace_core_paths has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function _replace_core_paths($str)
                                          {
                                              if (strpos($str, '_PATH') === false) {
                                                  return $str;
                                              }
                                      Severity: Minor
                                      Found in classes/yf_main.class.php - About 1 hr to fix

                                        Method _fix_sql_php has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function _fix_sql_php($sql_php)
                                            {
                                                $innodb_has_fulltext = self::_innodb_has_fulltext();
                                                if ( ! $innodb_has_fulltext) {
                                                    // Remove fulltext indexes from db structure before creating table
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language