Showing 728 of 865 total issues
File User_agent.php
has 292 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
File url_helper.php
has 292 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
Method _compile_queries
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _compile_queries()
{
$dbs = array();
// Let's determine which databases are currently connected to
Method _display
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _display($output = NULL)
{
// Note: We use load_class() because we can't use $CI =& get_instance()
// since this function is sometimes called by the caching mechanism,
// which happens before the CI super object is available.
Method _configure
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _configure(&$params)
{
$expiration = config_item('sess_expiration');
if (isset($params['cookie_lifetime']))
Method backup
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function backup($params = array())
{
// If the parameters have not been submitted as an
// array then we know that it is simply the table
// name, which is a valid short cut.
Method set_cookie
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function set_cookie($name, $value = '', $expire = 0, $domain = '', $path = '/', $prefix = '', $secure = NULL, $httponly = NULL, $samesite = NULL)
{
if (is_array($name))
{
// always leave 'name' in last place, as the loop will break otherwise, due to $$item
Function set_rules
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function set_rules($field, $label = null, $rules = null, $errors = array())
{
// No reason to set rules if we have no POST data
// or a validation array has not been specified
if ($this->CI->input->method() !== 'post' && empty($this->validation_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 _build_message
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
protected function _build_message()
{
if ($this->wordwrap === TRUE && $this->mailtype !== 'html')
{
$this->_body = $this->word_wrap($this->_body);
- 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_wh
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
protected function _compile_wh($qb_key)
{
if (count($this->$qb_key) > 0)
{
for ($i = 0, $c = count($this->$qb_key); $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 _ci_load_stock_library
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
protected function _ci_load_stock_library($library_name, $file_path, $params, $object_name)
{
$prefix = 'CI_';
if (class_exists($prefix.$library_name, 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
Method open_tag
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function open_tag($the_parser, $name)
{
$the_parser = (string) $the_parser;
// If invalid nesting, then return
Method load
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function load($langfile, $idiom = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '')
{
if (is_array($langfile))
{
foreach ($langfile as $value)
CI_Image_lib
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class CI_Image_lib {
/**
* PHP extension/library to use for image manipulation
* Can be: imagemagick, netpbm, gd, gd2
CI_User_agent
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class CI_User_agent {
/**
* Current user-agent
*
CI_DB_forge
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class CI_DB_forge {
/**
* Database object
*
File URI.php
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
Method load_driver
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function load_driver($child)
{
// Get CodeIgniter instance and subclass prefix
$prefix = config_item('subclass_prefix');
Method _ci_load
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _ci_load($_ci_data)
{
// Set the default data variables
foreach (array('_ci_view', '_ci_vars', '_ci_path', '_ci_return') as $_ci_val)
{
Function __construct
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(array $params = array())
{
// No sessions under CLI
if (is_cli())
{
- 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"