Showing 728 of 865 total issues
Method _like
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function _like($field, $match = '', $type = 'AND ', $side = 'both', $not = '', $escape = NULL)
Function _limit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function _limit($sql)
{
$limit = $this->qb_offset + $this->qb_limit;
// As of SQL Server 2005 (9.0.*) ROW_NUMBER() is supported,
- 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 plural
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function plural($str)
{
$result = strval($str);
if ( ! word_is_countable($result))
- 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 _compile_order_by
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function _compile_order_by()
{
if (empty($this->qb_orderby))
{
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 _build_dsn
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function _build_dsn()
{
$this->dsn === '' OR $this->dsn = '';
if (strpos($this->hostname, '/') !== 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 __construct
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __construct()
{
$this->config =& get_config();
// Set the base_url automatically if none was provided
- 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
Avoid deeply nested control flow statements. Open
for ($j = 0; $j < 8; $j++)
{
$ip[$j] = intval($ip[$j], 16);
}
Function is_really_writable
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function is_really_writable($file)
{
// If we're on a UNIX-like server, just is_writable()
if (DIRECTORY_SEPARATOR === '/')
{
- 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 _error_handler
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function _error_handler($severity, $message, $filepath, $line)
{
$is_error = (((E_ERROR | E_PARSE | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR) & $severity) === $severity);
// When an error occurred, set the status header to '500 Internal Server Error'
- 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 html_escape
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function html_escape($var, $double_encode = TRUE)
{
if (empty($var))
{
return $var;
- 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 hash_pbkdf2
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function hash_pbkdf2($algo, $password, $salt, $iterations, $length = 0, $raw_output = FALSE)
Avoid deeply nested control flow statements. Open
if ($proxy_ips[$i] === $this->ip_address)
{
$this->ip_address = $spoof;
break;
}
Consider simplifying this complex logical expression. Open
if (preg_match($valid_dsns['tns'], $this->hostname))
{
$this->dsn = $this->hostname;
return;
}
Method hkdf
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function hkdf($key, $digest = 'sha512', $salt = NULL, $length = NULL, $info = '')
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($path, $server, $port = 80, $proxy = FALSE, $proxy_port = 8080)
Method _wh
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function _wh($qb_key, $key, $value = NULL, $type = 'AND ', $escape = NULL)
Method load
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function load($langfile, $idiom = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '')
Function _set_browser
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function _set_browser()
{
if (is_array($this->browsers) && count($this->browsers) > 0)
{
foreach ($this->browsers as $key => $val)
- 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_filename
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function set_filename($path, $filename)
{
if ($this->encrypt_name === TRUE)
{
$filename = md5(uniqid(mt_rand())).$this->file_ext;
- 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 _load_agent_file
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function _load_agent_file()
{
if (($found = file_exists(APPPATH.'config/user_agents.php')))
{
include(APPPATH.'config/user_agents.php');
- 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"