Showing 486 of 487 total issues
Function generateFilterElement
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function generateFilterElement($value, $key)
{
$filters_element = '';
foreach ($value as $v_key => $v_value) {
if ($v_key == 'filter_type') {
- 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 _overwrite_value_from_database
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function _overwrite_value_from_database($item)
{
if (class_exists('CI_Controller')) {
if (!isset(CI_Controller::get_instance()->db)) {
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 edit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function edit($display_view = true)
{
$id = $this->input->getParam('id');
$sameuser = $this->auth->getUserId() == $id;
- 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 renderComponent
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes)
{
$output_element = '';
if (is_array($field['values'])) {
$output_element .= '<select name="' . $field['field'] . '" id="' . $field['field'] . '" class="text' .
- 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 fast_cache_get_cache_for_uri
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function fast_cache_get_cache_for_uri($uri)
{
$uri_hash = md5($uri);
$filepath = INSTALLATIONPATH . 'application/cache/pages/' . $uri_hash . '.html';
- 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 _display_cache
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function _display_cache(&$CFG, &$URI)
{
// Failsafe variable
$no_fastcacheable = true;
- 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 index
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function index()
{
$this->load->library('ModuleRunner');
$modules = ModuleRunner::getAvailableModules();
- 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 module_make
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function module_make()
{
$this->assign('title', $this->lang->line('development_make_a_new_module'));
$this->assign('success', 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 regenerateSetAcceptedFieldsForExistingModel
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function regenerateSetAcceptedFieldsForExistingModel($file_model_path, $data)
{
// Replace acceptable fields
$model_file_contents_exploded = file($file_model_path, FILE_IGNORE_NEW_LINES);
if (count($model_file_contents_exploded) > 0) {
- 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 _write_cache
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function _write_cache($output)
{
// Failsafe variable
$no_fastcacheable = true;
- 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 getInputType
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function getInputType($type, $field_name)
{
if ($type == 'smallint') {
return FormBuilder::CHECKBOX;
} elseif (self::isDbTypeNumeric($type)) {
- 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 too many return
statements within this method. Open
return $this->getSessionVariable('is_user_password_expired');
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $obj->value;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return $dump;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $success;