Showing 3,246 of 4,217 total issues
Method scan_dir
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function scan_dir($start_dir, $FLAT_MODE = true, $include_pattern = '', $exclude_pattern = '')
{
if ( ! file_exists($start_dir)) {
return false;
}
Method div_box
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function div_box($name, $values = [], $selected = '', $extra = [])
{
if (is_array($name)) {
$extra = (array) $extra + $name;
$name = $extra['name'];
Method _preload_data
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _preload_data()
{
if ($this->_preload_complete) {
return true;
}
Method options_to_str
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function options_to_str(array $options, $is_request = true, $level = 1)
{
if ($level > $this->options_level_max) {
return null;
}
Method edit
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function edit()
{
$id = (int) ($_GET['id']);
if ( ! $id) {
return js_redirect(url('/@object'), false, 'Empty ID');
Method add_rule
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function add_rule()
{
$block_info = db()->query_fetch('SELECT * FROM ' . db('blocks') . ' WHERE id=' . (int) ($_GET['id']));
if (empty($block_info['id'])) {
return _e('No such block!');
Method _get_compiled_string
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _get_compiled_string($name, $replace = [], $params = [])
{
$compiled_string = null;
// TODO: add ability to use memcached or other fast cache-oriented storage instead of files => lower disk IO
$compiled_storage = 'files';
Method _validate_prepare
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _validate_prepare($validate_rules = [], $extra = [])
{
$form_global_validate = isset($this->_params['validate']) ? $this->_params['validate'] : (isset($this->_replace['validate']) ? $this->_replace['validate'] : []);
foreach ((array) $form_global_validate as $name => $rules) {
$this->_validate_rules[$name] = $rules;
Method list_keys
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function list_keys()
{
$do_real_work = true;
if ( ! $this->_driver_ok) {
$do_real_work = false;
Method query_fetch
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function query_fetch($sql, $use_cache = true, $assoc = true, $return_sql = false)
{
if ( ! strlen($sql)) {
return false;
}
Method connect
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function connect()
{
$dsn = 'mysql:host=' . $this->params['host'];
if ($this->params['port'] && $this->params['port'] != $this->DEF_PORT) {
$dsn .= ';port=' . $this->params['port'];
Method _load_oauth_providers
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _load_oauth_providers()
{
$config = $this->_load_oauth_config();
if (isset($this->_providers_loaded)) {
return $this->_providers;
Method go
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function go($text = '')
{
$cur_page_md5 = md5($_GET['object'] . '%%' . $_GET['action'] . '%%' . $_GET['id']);
// Verify and send email
if ( ! empty($_POST['go'])) {
Method clear_pattern_child_process
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function clear_pattern_child_process()
{
if ( ! isset($_GET['id']) && (int) ($_GET['id'])) {
return t('Empty clear pattern ID');
}
Method add_item
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function add_item()
{
$cat_info = db()->query_fetch('SELECT * FROM ' . db('categories') . ' WHERE id=' . (int) ($_GET['id']));
if (empty($cat_info['id'])) {
return _e('No such category!');
Method add
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function add()
{
$a = $_POST;
if ((int) ($_GET['receiver_id']) != 0) {
$a['receiver_id'] = $_GET['receiver_id'];
Method edit
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function edit()
{
$ds = $this->_get_dashboard_data($_GET['id']);
if ( ! $ds['id']) {
return _e('No such record');
Method quick_menu
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function quick_menu()
{
if ( ! $this->QUICK_MENU_ENABLED
|| (MAIN_TYPE_USER && ( ! isset($_SESSION['user_id']) || ! $_SESSION['user_id']))
|| (MAIN_TYPE_ADMIN && ( ! isset($_SESSION['admin_id']) || ! $_SESSION['admin_id']))
Method _preload_plugins_list
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _preload_plugins_list($force = false)
{
$this->PROFILING && $this->_timing[] = [microtime(true), __CLASS__, __FUNCTION__, $this->trace_string(), func_get_args()];
if (isset($this->_plugins) && ! $force) {
return $this->_plugins;
Method test_basic_queries_and_fetching
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_basic_queries_and_fetching()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}