Showing 486 of 487 total issues
Method getAdvancedFeed
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getAdvancedFeed($columns, $offset, $rowcount, $order_by_column, $order, $filters, $extra_param)
{
if (!$columns || $columns == '*') { // TODO Check if $columns == '*' is ok
$columns = $this->getTable() . '.*';
}
Method saveConfigByName
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function saveConfigByName($name, $value, $module = null)
{
$entry = $this->getByName($name);
$id = false;
Method revision
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function revision()
{
$id = $this->input->getParam('id');
$revision_id = $this->input->getParam('revision_id');
Method getManyToManyRelationshipsRelatedToTable
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getManyToManyRelationshipsRelatedToTable($table)
{
$related_foreign_keys = $this->getForeignKeysRelatedToTable($table);
$many_to_many_fks = array();
Method install
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function install($module_name, $is_displayed_in_menu = false, $is_displayed_in_utilities = true, $parent_module_id = null)
{
if ($this->isInstalled($module_name)) {
return false;
}
Method niceuri
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function niceuri($name)
{
//form_prep
if (strlen($name) == 0) {
return '';
Method drawSimplePieChart
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function drawSimplePieChart($data_feed, $title = '', $width = 1200, $height = 200)
{
$id = $this->generateId('pie_chart');
$out = $this->includeJavaScripts();
Method configure
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function configure()
{
$module = $this->input->getParam('module');
$render_as_module = $this->input->getParam('render_as_module');
Function writeDatabase
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function writeDatabase($data)
{
$db = $this->load->database($this->getDefaultDatabaseConfig($data), true);
$error = 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 addColumnByDefinition
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function addColumnByDefinition($column, $key = false)
{
$defaults = $this->getFieldDefaults();
if (!isset($column['filter_condition']) && isset($column['filter_type'])) {
$defaults['filter_condition'] = $this->getDefaultFilterConditionByFilterType($column['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 getTwig
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function getTwig()
{
if (!self::$twig_instance) {
$this->benchmark->mark('twig_initialization_start');
$loader = new Twig_Loader_Filesystem();
- 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 getAllAvailableEntities
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getAllAvailableEntities()
{
$all_entities = array();
$entities = 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 update
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function update($user_id, $display_name, $user_login = false, $group_ids = false, $password = false, $is_root = null, $data = array())
{
// Change user password if specified
if ($password) {
$this->changePasswordByUserId($user_id, $password);
- 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 applyWhere
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function applyWhere($db, $where_conditions)
{
if ($where_conditions) {
foreach ($where_conditions as $key => $condition) {
if (!$key || is_numeric($key)) {
- 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
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function error($message, $collection = 'SYSTEM', $resource_id = false, $notify = true)
{
if ($notify && self::$config->item('debug_maintainer_email_address')) {
$hash = md5($message . '' . $collection);
$path = INSTALLATIONPATH . 'application/cache/errors/';
- 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 buildFileStructure
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function buildFileStructure($base_path)
{
$mainpage_module_path = $base_path . 'modules/mainpage/';
$files_template_path = realpath(dirname(realpath(__FILE__)) . '/../../resources/files_template/') . '/';
- 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 drawSimpleLineChart
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public function drawSimpleLineChart($data_feed, $collumn1_desc = '', $collumn2_desc = '', $width = 1200, $height = 200, $max_value = 10, $column1_data_type = "string", $column2_datatype = "number", $colors = array(), $type = 'number')
Function render
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
$this->benchmark->mark('widget_'.$this->module_name.'_'.$this->module_name.'_render_start');
$controller_path = $this->modulepathresolver->getWidgetControllerPath($this->module_name);
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
public function index()
{
if (ENVIRONMENT !== 'development') {
show_error('Upgradedb utility is only available in development environment. <a href="' . admin_url() . '">Go back to admin panel</a>');
- 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 library
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function library($library = '', $params = null, $object_name = null)
{
if (empty($library)) {
return $this;
} elseif (is_array($library)) {
- 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"