Showing 3,246 of 4,217 total issues
Method get_deep_array
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_deep_array($sql, $max_levels = 0, $use_cache = true)
{
if ( ! strlen($sql)) {
return false;
}
Method _save_query_revision
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _save_query_revision($method, $table, $params = [])
{
if (($allowed_methods = $this->QUERY_REVISIONS_METHODS)) {
if ( ! in_array($method, $allowed_methods)) {
return false;
Method rotate
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function rotate($source_file_path, $dest_file_path, $ANGLE)
{
// Check source file
if ( ! file_exists($source_file_path) || ! filesize($source_file_path) || ! is_readable($source_file_path)) {
trigger_error('ROTATE_IMG: Source file is empty', E_USER_WARNING);
Method upload_file
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function upload_file()
{
no_graphics(true);
if ( ! MAIN_TYPE_ADMIN) {
return print 'access denied';
Method _sql
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _sql($options = [])
{
// get options
$_ = &$options;
$fields = (array) $_['fields'] ?: [];
Method delete
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function delete()
{
$user_id = (int) ($_GET['id']);
if ( ! $user_id) {
return false;
Method products_similar_by_price
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function products_similar_by_price($price, $id)
{
$price_min = floor($price - ($price * 10 / 100));
$price_max = ceil($price + ($price * 10 / 100));
$sql1 = 'SELECT category_id FROM ' . db('shop_product_to_category') . ' WHERE product_id = ' . $id . '';
Method replace
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function replace($start_dirs, $pattern_include = '', $pattern_exclude = '', $pattern_find, $pattern_replace)
{
$files = [];
if ( ! is_array($start_dirs)) {
$start_dirs = [$start_dirs];
Method grep
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function grep($pattern_find, $start_dirs, $pattern_path = '*', $extra = [])
{
if ( ! $pattern_find) {
return false;
}
Method resend_code
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function resend_code()
{
if ( ! empty($_POST['email'])) {
$user_info = db()->query_fetch('SELECT * FROM ' . db('user') . ' WHERE email="' . _es($_POST['email']) . '"');
if (empty($user_info)) {
Method copy_dir
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function copy_dir($path1, $path2, $pattern_include = '', $pattern_exclude = '', $level = null)
{
if ( ! $path1 || ! file_exists($path1)) {
return false;
}
Method _format_date
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _format_date($input_date = '', $type = 'short')
{
if ( ! strlen($input_date)) {
return '';
}
Method test__parse_column_type
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test__parse_column_type()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
Method require_php_lib
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function require_php_lib($name, $params = [])
{
if (isset($this->php_libs[$name])) {
return $this->php_libs[$name];
}
Method test_order5
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_order5()
{
$jquery_url = _class('assets')->get_asset('jquery', 'js');
$url = $jquery_url;
$url1 = $url . '?v=1';
Method test_prepare_html
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_prepare_html()
{
$this->assertEquals('test', _prepare_html('test'));
$this->assertEquals('test' . PHP_EOL . 'test', _prepare_html('test' . PHP_EOL . 'test'));
$this->assertEquals('{', _prepare_html('{'));
Method test_basic
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_basic()
{
$this->assertFalse(wildcard_compare('regex are useful', ''));
$this->assertFalse(wildcard_compare('regex are * useful', ''));
$this->assertFalse(wildcard_compare('regex are * useful', 'regex'));
Method autotranslate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function autotranslate()
{
$a['back_link'] = url('/@object/vars');
$a['redirect_link'] = $a['back_link'];
! $a['lang_from'] && $a['lang_from'] = 'en';
Method _sub_add
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _sub_add($info, $asset_type, $_params = [])
{
if ( ! $info) {
return false;
}
Method collect
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function collect()
{
$defaults = [
'back_link' => url('/@object/vars'),
'redirect_link' => url('/@object/vars'),