Showing 482 of 487 total issues
Method resolveComponent
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function resolveComponent($componentId)
{
/**
* @var $registeredComponents \PiotrPolak\PepisCMS\Formbuilder\Component\ComponentInterface[]
*/
Method edit
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function edit($display_view = true)
{
$id = $this->input->getParam('id');
$sameuser = $this->auth->getUserId() == $id;
Consider simplifying this complex logical expression. Open
<?php if (count($controllers) && count($entities)): ?>
<?php if ($is_editable): ?>
<?= display_tip($this->lang->line('acl_edit_tip')) ?>
<?php endif; ?>
Method computeSubmenuItem
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
private function computeSubmenuItem($controller, $method, $language_code, $pull_submenu_from_controller,
array $menu_map_item_template, $item, $module, array $menu_map_item)
Method sendTemplate
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public function sendTemplate($to, $from, $from_name, $subject, $email_template_path,
$data = array(), $html = false, $attachments = array())
Method drawSimpleColumnChart
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public function drawSimpleColumnChart($data_feed, $collumn1_desc = '', $collumn2_desc = '', $width = 1200, $height = 200, $max_value = 10, $column1_data_type = "string", $column2_datatype = "number")
Function saveConfigByName
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function saveConfigByName($name, $value, $module = null)
{
$entry = $this->getByName($name);
$id = 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 log
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function log($message, $level = self::MESSAGE_LEVEL_INFO, $collection = 'SYSTEM', $resource_id = false, $user_id = false, $timestamp = false)
{
$CI = &get_instance();
$CI->load->helper('date');
- 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 addFilter
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function addFilter($label, $field = false, $filter_type = self::FILTER_BASIC, $filter_values = false, $filter_condition = false)
{
if (!is_array($label)) {
if (!$filter_condition) {
$filter_condition = $this->getDefaultFilterConditionByFilterType($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 runMultipleSqlQueries
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function runMultipleSqlQueries($sql, $query_separator = ';')
{
$rs = false;
$this->db->trans_start();
- 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 saveById
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function saveById($id, $data)
{
foreach ($data as $_param_name => $_param_value) {
if (!in_array($_param_name, $this->getAcceptedPostFields())) {
continue;
- 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 writeConfigFiles
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function writeConfigFiles($data, $base_path)
{
list($hostname, $port) = $this->explodeHostname($data['hostname']);
$templates_base_path = realpath(dirname(realpath(__FILE__)) . '/../../resources/config_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
Function index
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function index()
{
$reflection = new ReflectionClass($this);
$methods = $reflection->getMethods(ReflectionMethod::IS_PUBLIC);
- 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_action_bar
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function display_action_bar($actions)
{
if (count($actions) == 0) {
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 features
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function features()
{
$_LANG_DIR = dirname(realpath(__FILE__)) . '/../../language/';
$_THEMES_DIR = INSTALLATIONPATH . 'theme/';
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
public function execute($baseDir, $currentRelativePath, $input)
{
$files = $this->getFiles($input);
$new_path = $this->getNewLocation($input);
- 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 _getPageEditDefinition
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function _getPageEditDefinition($input_groups, $page_id, $site_language)
{
$definition = array();
$definition['page_title'] = array(
'input_group' => $input_groups['document'],
- 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 update
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function update($user_id, $display_name, $user_login = false, $group_ids = false, $password = false, $is_root = null, $data = array())
Method getMenuFlat
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getMenuFlat($parent_item_id = 0, $language_code = 'en', $dont_enter_item_id = false, $separator = false, &$menu = array(), $return = true, $prefix = '')
Method getAdvancedFeed
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getAdvancedFeed($columns, $offset, $rowcount, $order_by_column, $order, $filters, $extra_param)