Showing 486 of 487 total issues
Method buildTranslations
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function buildTranslations($module_name, $translations, $module_label, $language_pairs, $directory, $module_name_lower_case)
Function _datagrid_format_item_order_column
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public function _datagrid_format_item_order_column($content, &$line)
{
$id_field_name = &$this->id_field_name;
$o = $this->datagrid->getOrder();
- 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 formatCells
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function formatCells($menu, $level, &$lang, &$url_suffix, $site_language, $view)
Consider simplifying this complex logical expression. Open
Open
<?php if ((SecurityManager::hasAccess('utilities', 'flush_html_cache') || SecurityManager::hasAccess('utilities', 'flush_security_policy_cache') || SecurityManager::hasAccess('utilities', 'flush_system_cache') || SecurityManager::hasAccess('acl') || SecurityManager::hasAccess('logs') || SecurityManager::hasAccess('utilities', 'systeminfo'))): ?>
<h1 class="contrasted"><?= $lang->line('utilities_label_cache') ?></h1>
<ul class="dashboard_actions clear">
Consider simplifying this complex logical expression. Open
Open
if ($H >= 0 && $H <= 24
&& $i >= 0 && $i <= 60
&& $s >= 0 && $s <= 60
) {
return true;
Method generateLink
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private static function generateLink($base_url, $page = 1, $order_by = false, $order = false, $filters = false)
Method registerChange
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function registerChange($user_id, $password_encoded, $hashing_salt, $hashing_algorithm, $hasing_iterations)
Method executeSshCommand
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function executeSshCommand($host, $port, $login = false, $password = false, $command = false)
Method addFilter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addFilter($label, $field = false, $filter_type = self::FILTER_BASIC, $filter_values = false, $filter_condition = false)
Method generatePagination
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function generatePagination($no_of_pages, $order_by, $order, $applied_filter_values, $page)
Method setMessage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function setMessage($label_name, $param1 = null, $param2 = null, $param3 = null, $param4 = null)
Method computeReadOnlyComponentHtml
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function computeReadOnlyComponentHtml($field, $valueEscaped, $object,
\PiotrPolak\PepisCMS\Formbuilder\Component\ComponentInterface $component, $formatting_function_for_uneditable)
Method render
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function render($controller, $method, $language_code = '', $pull_submenu_from_controller = false, $current_module = false)
Method computeCacheVariableName
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function computeCacheVariableName($controller, $method, $language_code, $pull_submenu_from_controller, $current_module)
Method button_generic
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function button_generic($label, $url, $icon_path, $extra_classes = '', $id = false)
Method renderInput
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function renderInput($field, $value, &$object,
\PiotrPolak\PepisCMS\Formbuilder\Component\ComponentInterface $component, $readOnly)
Method buildMenuItem
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function buildMenuItem($language_code, $pull_submenu_from_controller, $current_module, array $menu_map_item_template, $item)
Method renderComponent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes)
Method renderComponent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes)
Method renderComponent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes)