Showing 3,246 of 4,217 total issues
Method utf2win1251
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function utf2win1251($s)
{
$out = '';
for ($i = 0; $i < strlen($s); $i++) {
Method load_spiders_ips
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function load_spiders_ips()
{
$ext = '.txt';
$ext_len = strlen($ext);
$pattern = '{,plugins/*/}share/spiders/*' . $ext;
Method invoice
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function invoice()
{
$id = (int) $_GET['id'];
$_GET['id'] = $id;
list($css, $html) = $this->_prepare_invoice_body($id);
Method search_product_by_filename
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function search_product_by_filename($folder, $supplier_id = false)
{
$filename = basename($folder);
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$filename = ltrim($filename, ' .-_+=/\|,!@#%~&*()');
Method pics_browser
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function pics_browser()
{
if (isset($_GET['active']) && $_GET['active'] == 1) {
$active = ' AND p.active = \'1\' ';
} elseif (isset($_GET['active']) && $_GET['active'] == 0) {
Method _attributes_html
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _attributes_html($object_id = 0, $only_selected = false)
{
$object_id = $params['object_id'];
$only_selected = $params['only_selected'];
Method clone_cat
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function clone_cat()
{
$_GET['id'] = (int) ($_GET['id']);
if ( ! empty($_GET['id'])) {
$cat_info = db()->query_fetch('SELECT * FROM ' . db('categories') . ' WHERE id=' . (int) ($_GET['id']));
Method save
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function save()
{
$lang = $_GET['page'];
if ( ! is_post() || ! $lang || ! isset($this->all_langs[$lang])) {
return js_redirect(url('/@object'));
Method _debug_profiling
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _debug_profiling(&$params = [])
{
$all_timings = main()->_timing;
if ( ! $all_timings) {
return false;
Method _show_edit_widget_items
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _show_edit_widget_items($column_items = [], $ds = [])
{
$items_configs = $ds['data']['items_configs'];
$ds_settings = $ds['data']['settings'];
Method test_fix_data_safe
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_fix_data_safe()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
Method test_cleanup_33_2
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_cleanup_33_2()
{
$closure = function ($in) {
return module('register')->_login_not_exists($in);
};
Method test_cleanup_33_1
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_cleanup_33_1()
{
$closure = function ($in) {
return module('register')->_login_not_exists($in);
};
Method test_order4
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_order4()
{
$url = 'http://jquery.com/jquery-wp-content/themes/jquery.com/style.css';
$url1 = $url . '?v=1';
$url2 = $url . '?v=2';
Method test_select_aggregates
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_select_aggregates()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
Method test_delete
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_delete()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
Method test_resize
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_resize()
{
if (getenv('CI') == 'jenkins') {
$this->markTestSkipped('Right now we skip this test, when running inside Jenkins.');
}
Method test_main
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_main()
{
$this->assertEquals('0', todecimal(''));
$this->assertEquals('1', todecimal(1));
$this->assertEquals('-1', todecimal(-1));
Consider simplifying this complex logical expression. Open
Open
if ($method == 'bower' && $this->ALLOW_GET_FROM_BOWER && $_files) {
return $this->get_asset_from_bower($_name, $_version, $data, $asset_type);
} elseif ($method == 'github' && $this->ALLOW_GET_FROM_GITHUB && $_files) {
return $this->get_asset_from_github($_name, $_version, $data, $asset_type);
} elseif ($method == 'cdn' && $this->ALLOW_GET_FROM_CDN && isset($asset_data[$method]) && isset($asset_data[$method][$asset_type])) {
Consider simplifying this complex logical expression. Open
Open
if (($sel_data['country_code'] && $sel_data['country_code'] != $this->_user_info['country'])
|| ($sel_data['region_code'] && $sel_data['region_code'] != $this->_user_info['state'])
|| ($sel_data['city_name'] && strtolower($sel_data['city_name']) != strtolower($this->_user_info['city']))
|| ($sel_data['zip_code'] && $sel_data['zip_code'] != $this->_user_info['zip_code'])
) {