Showing 4,217 of 4,217 total issues
Method _debug_stpls
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _debug_stpls(&$params = [])
{
if ( ! $this->SHOW_STPLS) {
return '';
}
Method call_class_method
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function call_class_method($class_name = '', $custom_path = '', $method_name = '', $method_params = '', $tpl_name = '', $silent = false, $use_cache = false, $cache_ttl = -1, $cache_key_override = '')
{
if ( ! strlen($class_name) || ! strlen($method_name)) {
return false;
}
Method edit
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function edit()
{
$id = (int) $_GET['id'];
if ($id) {
$a = from(self::table)->whereid($id)->get();
Method test_real_escape_string
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_real_escape_string()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
Method import_base_db_structure
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function import_base_db_structure()
{
$import_tables = [
'dashboards',
'static_pages',
Function _url_control
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _url_control()
{
if ( ! $this->ALLOW_URL_CONTROL) {
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 _user_message
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function _user_message($options = null)
{
$url = &$this->url;
// import operation
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
- 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 _user_message
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function _user_message($options = null)
{
$url = &$this->url;
// import operation
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
- 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 edit_item
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function edit_item()
{
// TODO: save file revision to db on each save
if ( ! empty($_GET['id'])) {
$file_name = urldecode($_GET['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 _action_on_block_denied
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _action_on_block_denied($block_name = '')
{
if ($block_name == 'center_area') {
if ($this->TASK_DENIED_403_HEADER) {
header(($_SERVER['SERVER_PROTOCOL'] ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1') . ' 403 Forbidden');
- 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 _get_sites_info
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _get_sites_info()
{
foreach ((array) $this->info as $site_id => $info) {
$tmp_string = '';
$found = [];
- 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 _get_sites_info
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _get_sites_info()
{
// Process config files
foreach ((array) $this->info as $site_id => $info) {
$tmp_string = '';
- 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 ui_range
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function ui_range($name, $desc = '', $extra = [], $replace = [], $form)
{
if (is_array($desc)) {
$extra += $desc;
$desc = '';
- 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_batch
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function update_batch($table, array $data, $index = null, $only_sql = false, $params = [])
{
if ( ! $index) {
$index = $this->get_key_name($table);
}
- 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 _sql_part_to_array
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _sql_part_to_array($part, $data = null, $config = null, $return_raw = false)
{
if ( ! $part) {
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 _is_where_all_numeric
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _is_where_all_numeric(&$where)
{
if (empty($where) || ( ! is_array($where) && ! is_numeric($where))) {
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 alter_table
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function alter_table($table_name, $column_name, $db)
{
if ( ! $this->get_lock()) {
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 compare
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function compare($params = [])
{
$installer = $this->db->installer();
$utils = $this->db->utils();
$db_prefix = $this->db->DB_PREFIX;
- 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 _get_browser_info
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _get_browser_info()
{
if ( ! empty($_SERVER['HTTP_USER_AGENT'])) {
$HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
} elseif ( ! isset($HTTP_USER_AGENT)) {
- 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_file
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function upload_file()
{
no_graphics(true);
if ( ! MAIN_TYPE_ADMIN) {
return print 'access denied';
- 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"