Showing 728 of 865 total issues
File Calendar.php
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
Function send
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function send($tb_data)
{
if ( ! is_array($tb_data))
{
$this->set_error('The send() method must be passed an array');
- 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 _reset_data_array
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function _reset_data_array(&$data)
{
foreach ($this->_field_data as $field => $row)
{
if ($row['postdata'] !== 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
Function run
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function run($config = NULL, &$data = NULL)
{
$validation_array = empty($this->validation_data)
? $_POST
: $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 directory_map
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function directory_map($source_dir, $directory_depth = 0, $hidden = FALSE)
{
if ($fp = @opendir($source_dir))
{
$filedata = array();
- 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_autoloader
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function _ci_autoloader()
{
if (file_exists(APPPATH.'config/autoload.php'))
{
include(APPPATH.'config/autoload.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"
Further reading
Function _set_routing
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function _set_routing()
{
// Load the routes.php file. It would be great if we could
// skip this for enable_query_strings = TRUE, but then
// default_controller would be empty ...
- 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 parseRequest
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parseRequest($data = '')
{
//-------------------------------------
// Get Data
//-------------------------------------
Method sendPayload
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function sendPayload($msg)
{
if ($this->proxy === FALSE)
{
$server = $this->server;
Method image_process_gd
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function image_process_gd($action = 'resize')
{
$v2_override = FALSE;
// If the target width/height match the source, AND if the new file name is not equal to the old file name
Method db_connect
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function db_connect($persistent = FALSE)
{
if (isset($this->stricton))
{
if ($this->stricton)
CI_URI
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class CI_URI {
/**
* List of cached URI segments
*
CI_Security
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class CI_Security {
/**
* List of sanitize filename strings
*
Method set_rules
has 58 lines of code (exceeds 25 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))
File postgre_driver.php
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
Method join
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function join($table, $cond, $type = '', $escape = NULL)
{
$type = trim(strtoupper($type).' JOIN');
preg_match('#^(NATURAL\s+)?((LEFT|RIGHT|FULL)\s+)?((INNER|OUTER)\s+)?JOIN$#', $type) OR $type = 'JOIN';
Method _send_command
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _send_command($cmd, $data = '')
{
switch ($cmd)
{
case 'hello':
Method _set_routing
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _set_routing()
{
// Load the routes.php file. It would be great if we could
// skip this for enable_query_strings = TRUE, but then
// default_controller would be empty ...
Method array_column
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
function array_column(array $array, $column_key, $index_key = NULL)
{
if ( ! in_array($type = gettype($column_key), array('integer', 'string', 'NULL'), TRUE))
{
if ($type === 'double')
Function open_tag
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function open_tag($the_parser, $name)
{
$the_parser = (string) $the_parser;
// If invalid nesting, then 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"