Showing 485 of 486 total issues
Function moduleLibrary
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public function moduleLibrary($module_name, $library, $params = null)
{
if ($library == '') {
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
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
if ($H >= 0 && $H <= 24
&& $i >= 0 && $i <= 60
&& $s >= 0 && $s <= 60
) {
return true;
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">
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 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 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 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 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 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 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 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 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 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 renderComponent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function renderComponent($field, $value, $valueEscaped, &$object, $extra_css_classes)
Method load
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function load($langfile, $idiom = '', $return = false, $add_suffix = true, $alt_path = '')
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)