Showing 3,246 of 4,217 total issues
Method auto
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function auto($table = '', $id = '', $params = [], $form)
{
if ($params['links_add']) {
$form->_params['links_add'] = $params['links_add'];
}
Method image
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function image($name, $path, $link = '', $extra = [], $table)
{
if (is_array($path)) {
$extra = (array) $extra + $path;
$path = '';
Method render_type_blocks
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render_type_blocks($params = [])
{
$total_records = $params['total_records'];
$per_page = $params['per_page'];
$requested_page = $params['requested_page'];
Method ajax_validate
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ajax_validate()
{
no_graphics(true);
header('X-Robots-Tag: noindex, nofollow, noarchive, nosnippet');
Function li_tree
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function li_tree($data = [], $extra = [])
{
$extra['id'] = $extra['id'] ?: __FUNCTION__ . '_' . ++$this->_ids[__FUNCTION__];
if ($data) {
$data = $this->_parent->_recursive_sort_items($data);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function tabs
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function tabs($tabs = [], $extra = [])
{
$extra['id'] = $extra['id'] ?: __FUNCTION__ . '_' . ++$this->_ids[__FUNCTION__];
$extra_by_id = [];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _collect_vars_in_file
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function _collect_vars_in_file($file, $type, $params = [])
{
if ( ! $file) {
return [];
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function drag_items
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function drag_items()
{
if (empty($_GET['id'])) {
return _e('No id!');
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function group_by
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function group_by()
{
$sql = '';
$items = func_get_args();
if ( ! count((array) $items)) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _render_auto
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function _render_auto(&$params, &$data)
{
if ($params['auto'] && $data) {
$field_names = array_keys((array) current((array) $data));
$skip_fields = [];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function fetch_data
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function fetch_data($params = [])
{
// Templates names
$STPL_MAIN = ! empty($params['stpl_main']) ? $params['stpl_main'] : 'system/common/get_rss_page_main';
$STPL_ITEM = ! empty($params['stpl_item']) ? $params['stpl_item'] : 'system/common/get_rss_page_item';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _save_log
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function _save_log($params = [])
{
if ( ! $this->LOG_REDIRECTS) {
return false;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function upload_dir
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function upload_dir($server_info = [], $local_dir = '', $remote_dir = '', $pattern_include = '', $pattern_exclude = '', $level = null)
{
$local_dir = _class('ssh')->_prepare_path($local_dir);
$remote_dir = _class('ssh')->_prepare_path($remote_dir);
if ( ! _class('ssh')->_INIT_OK || ! $server_info || ! strlen($local_dir) || ! strlen($remote_dir)) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function mkdir_m
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function mkdir_m($server_info = [], $dir_name = '', $dir_mode = 755, $create_index_htmls/*!not implemented here!*/ = 0, $start_folder = '/')
{
if ( ! _class('ssh')->_INIT_OK || ! $server_info) {
return false;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _do_rewrite
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function _do_rewrite()
{
$this->PROFILING && $this->_timing[] = [microtime(true), __CLASS__, __FUNCTION__, $this->trace_string(), func_get_args()];
if ($this->is_console() || MAIN_TYPE_ADMIN || ! module_conf('tpl', 'REWRITE_MODE')) {
return false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _update_config
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function _update_config($name = '', $no_indexing = false, $no_write = false)
{
$conf_file_path = $this->CONF_PATH . 'sphinx.conf';
if (file_exists($conf_file_path) && ! is_readable($conf_file_path)) {
return _e('Error!. File ' . $conf_file_path . ' is not readable! Please check permissions.');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _mkdir_m
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function _mkdir_m($dir_name, $dir_mode = 0755, $create_index_htmls = 0, $start_folder = '')
{
if ( ! $dir_name || ! strlen($dir_name)) {
return 0;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method view
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function view()
{
// check operation
$operation = $this->_operation();
// import options
Method deposition
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function deposition($options)
{
if ( ! $this->ENABLE) {
return null;
}
Method _do_login
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _do_login()
{
$AUTH_LOGIN = trim($_POST[$this->LOGIN_FIELD]);
$AUTH_PSWD = trim($_POST[$this->PSWD_FIELD]);