Showing 3,246 of 4,217 total issues
Method increment
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function increment($field, $step = 1, $as_sql = false)
{
if ( ! $field) {
return false;
}
Method apply
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function apply($name, $params = [])
{
if (is_array($name)) {
$params = (array) $params + $name;
$name = '';
Method insert
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
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;
}
Method _validate_url_by_http
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _validate_url_by_http($url)
{
if (empty($url)) {
return false;
}
Method _get_oauth_header
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _get_oauth_header($url, $params, $method = 'POST', $oauth_token_secret = '', $add_to_sign = [])
{
if ( ! is_array($params)) {
$params = [];
}
Method bs_current_theme
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function bs_current_theme($main_type = '', $force = false)
{
if ( ! $main_type) {
$main_type = MAIN_TYPE;
}
Method _display_preview
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _display_preview($params = [], $template = '')
{
$replace = $params['replace'];
$PARENT_OBJECT = $_REQUEST['parent_object'];
$PARENT_ACTION = $_REQUEST['parent_action'];
Method get_total_records
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);
Method get_user_info
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_user_info()
{
$access_token = $this->_storage_get('access_token');
if ( ! $access_token) {
$access_token = $this->get_access_token();
Method _get_conf
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _get_conf($key = null, array $options = [])
{
// lower
$k = strtolower($key);
if ( ! isset($this->config_default[$k])) {
Method _prepare_for_box
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);
}
Method show_friend_stats
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function show_friend_stats()
{
if (empty(main()->USER_ID)) {
return _error_need_login();
}
Method basket_add
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
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'];
Method init_files
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function init_files()
{
$this->PROFILING && $this->_timing[] = [microtime(true), __CLASS__, __FUNCTION__, $this->trace_string(), func_get_args()];
$include_files = [];
$required_files = [];
Method _save_log
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _save_log($params = [])
{
if ( ! $this->LOG_REDIRECTS) {
return false;
}
Method init_auth
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
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')) {
Method chart_bar_flash
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function chart_bar_flash($data, $params)
{
if (empty($data)) {
return;
}
Method tail
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function tail($file, $lines = 10)
{
if ( ! $file || ! file_exists($file)) {
return false;
}
Method _replace_core_paths
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _replace_core_paths($str)
{
if (strpos($str, '_PATH') === false) {
return $str;
}
Method _fix_sql_php
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
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