Showing 728 of 865 total issues
Function _ci_init_library
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
protected function _ci_init_library($class, $prefix, $config = FALSE, $object_name = NULL)
{
// Is there an associated config file for this class? Note: these should always be lowercase
if ($config === NULL)
{
- 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 __construct
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(array $params = array())
{
// No sessions under CLI
if (is_cli())
{
File Xmlrpcs.php
has 335 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
Method parseResponse
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parseResponse($fp)
{
$data = '';
while ($datum = fread($fp, 4096))
Method DB
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
function &DB($params = '')
{
// Load the DB config file if a DSN string wasn't passed
if (is_string($params) && strpos($params, '://') === FALSE)
{
Function _process_fields
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
protected function _process_fields($create_table = FALSE)
{
$fields = array();
foreach ($this->fields as $key => $attributes)
- 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 closing_tag
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function closing_tag($the_parser, $name)
{
$the_parser = (string) $the_parser;
if ($this->xh[$the_parser]['isf'] > 1) return;
Method db_connect
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function db_connect($persistent = FALSE)
{
// PHP 8.1 changes default error handling mode from silent to exceptions - reverse that
if (is_php('8.1'))
{
Method model
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function model($model, $name = '', $db_conn = FALSE)
{
if (empty($model))
{
return $this;
File Profiler.php
has 325 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
Method xss_clean
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function xss_clean($str, $is_image = FALSE)
{
// Is the string an array?
if (is_array($str))
{
Method ip_address
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ip_address()
{
if ($this->ip_address !== FALSE)
{
return $this->ip_address;
Function text_watermark
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function text_watermark()
{
if ( ! ($src_img = $this->image_create_gd()))
{
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 _execute
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
protected function _execute($m)
{
$methName = $m->method_name;
// Check to see if it is a system call
- 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 backup
has a Cognitive Complexity of 26 (exceeds 5 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.
- 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 auto_typography
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function auto_typography($str, $reduce_linebreaks = FALSE)
{
if ($str === '')
{
return '';
Method version
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function version($target_version)
{
// Note: We use strings, so that timestamp versions work on 32-bit systems
$current_version = $this->_get_version();
CI_Loader
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
class CI_Loader {
// All these are set automatically. Don't mess with them.
/**
* Nesting level of the output buffering mechanism
Method generate
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generate($table_data = NULL)
{
// The table data can optionally be passed to this function
// either as a database result object or an array
if ( ! empty($table_data))
File text_helper.php
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP