Showing 728 of 865 total issues
Function display_error
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function display_error($error = '', $swap = '', $native = FALSE)
{
$LANG =& load_class('Lang', 'core');
$LANG->load('db');
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
protected function _alter_table($alter_type, $table, $field)
{
if ($alter_type === 'DROP')
{
return parent::_alter_table($alter_type, $table, $field);
- 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 _process_indexes
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function _process_indexes($table)
{
$sql = '';
for ($i = 0, $c = count($this->keys); $i < $c; $i++)
- 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 site_url
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function site_url($uri = '', $protocol = NULL)
{
$base_url = $this->slash_item('base_url');
if (isset($protocol))
- 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 _uri_to_assoc
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function _uri_to_assoc($n = 3, $default = array(), $which = 'segment')
{
if ( ! is_numeric($n))
{
return $default;
- 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 set_status_header
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function set_status_header($code = 200, $text = '')
{
if (is_cli())
{
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
Method _load_agent_file
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _load_agent_file()
{
if (($found = file_exists(APPPATH.'config/user_agents.php')))
{
include(APPPATH.'config/user_agents.php');
Method _mcrypt_decrypt
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _mcrypt_decrypt($data, $params)
{
if ( ! is_resource($params['handle']))
{
return FALSE;
Method ascii_to_entities
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ascii_to_entities($str)
{
$out = '';
$length = defined('MB_OVERLOAD_STRING')
? mb_strlen($str, '8bit') - 1
Method _compile_select
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _compile_select($select_override = FALSE)
{
// Combine any cached components with the current statements
$this->_merge_cache();
Method _wh
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _wh($qb_key, $key, $value = NULL, $type = 'AND ', $escape = NULL)
{
$qb_cache_key = ($qb_key === 'qb_having') ? 'qb_cache_having' : 'qb_cache_where';
if ( ! is_array($key))
Method get_file_info
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_file_info($file, $returned_values = array('name', 'server_path', 'size', 'date'))
{
if ( ! file_exists($file))
{
return FALSE;
Method _smtp_authenticate
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _smtp_authenticate()
{
if ( ! $this->_smtp_auth)
{
return TRUE;
Method update_batch
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function update_batch($table, $set = NULL, $index = NULL, $batch_size = 100)
{
// Combine any cached components with the current statements
$this->_merge_cache();
Method _alter_table
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _alter_table($alter_type, $table, $field)
{
if ($alter_type === 'DROP')
{
return parent::_alter_table($alter_type, $table, $field);
Method do_multicall
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function do_multicall($call)
{
if ($call->kindOf() !== 'struct')
{
return $this->multicall_error('notstruct');
Method _get_lock
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _get_lock($session_id)
{
// PHP 7 reuses the SessionHandler object on regeneration,
// so we need to check here if the lock key is for the
// correct session ID.
Method _wh_in
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _wh_in($qb_key, $key, array $values, $not = FALSE, $type = 'AND ', $escape = NULL)
{
$qb_cache_key = ($qb_key === 'qb_having') ? 'qb_cache_having' : 'qb_cache_where';
if (empty($key) OR ! is_string($key))
Method order_by
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function order_by($orderby, $direction = '', $escape = NULL)
{
$direction = strtoupper(trim($direction));
if ($direction === 'RANDOM')
Method _alter_table
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _alter_table($alter_type, $table, $field)
{
if ($alter_type === 'DROP')
{
return parent::_alter_table($alter_type, $table, $field);