Showing 482 of 487 total issues
Method getAdvancedFeed
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getAdvancedFeed($columns, $offset, $rowcount, $order_by_column, $order, $filters, $extra_param)
Method getAdvancedFeed
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getAdvancedFeed($columns, $start, $rowcount, $orderby_column, $order, $filters, $extra_param);
Method mysqldump
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function mysqldump($db_host, $database, $db_user, $db_password, $tables = false, $dump_to_filename = false, $dump_structure = true)
Method log
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function log($message, $level = self::MESSAGE_LEVEL_INFO, $collection = 'SYSTEM', $resource_id = false, $user_id = false, $timestamp = false)
Function getMenuFlat
has a Cognitive Complexity of 8 (exceeds 5 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 = '')
{
if (!$language_code) {
$language_code = 'en';
}
- 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 valid_timestamp
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function valid_timestamp($str)
{
if (strlen($str) == 0) {
return 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
Method getAssocPairs
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getAssocPairs($key_column_name, $value_column_name, $table = false, $imitial_array = false,
$possible_keys = false, $where_conditions = false)
Method enableJournaling
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function enableJournaling($journaling_table = false, $include_fields = array(), $exclude_fields = array(),
$tag = null, $serialization_method = null, $unserialization_method = null)
Function setupDefaultConfig
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function setupDefaultConfig()
{
$this->load->config('editor');
$descriptor['editor_css_file'] = $this->config->item('editor_css_file');
$descriptor['editor_css_body_id'] = $this->config->item('editor_css_body_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
Method move
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function move($id, $direction, $table = false, $constraint_field_name = false,
$item_order_field_name = 'item_order', $id_field_name = 'id')
Function hasAccess
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function hasAccess($controller, $method = false, $module = false)
{
if (!$method) {
$method = 'index';
}
- 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 copyFileSsh
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function copyFileSsh($host, $port, $login = false, $password = false, $local_file = false, $remote_file = false)
Method generateExcel
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function generateExcel($feed, $headers = false, $file_name = false, $send = true, $print_headers = true, $excel_type = Spreadsheet::EXCEL_XLS)
Method move
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function move($id, $direction, $table = false, $constraint_field_name = false, $item_order_field_name = 'item_order', $id_field_name = 'id');
Method generateXML
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function generateXML($feed, $headers = false, $file_name = false, $send = true, $root_name = false, $item_name = false)
Method generateCSV
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function generateCSV($feed, $headers = false, $file_name = false, $send = true, $separator = false, $print_headers = true)
Avoid deeply nested control flow statements. Open
if (!$key) {
$key = $ki;
}
Method dashboard_box
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function dashboard_box($name, $url, $icon_path = false, $description = false, $is_popup = false, $target = false)
Function renderInput
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function renderInput($field, $value, &$object,
\PiotrPolak\PepisCMS\Formbuilder\Component\ComponentInterface $component, $readOnly)
{
$extra_css_classes = $this->computeExtraCssClasses($field);
- 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 buildSubmenuUrl
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function buildSubmenuUrl($module, $item, $language_code)
{
if (!$module->name) {
$submenu_url = admin_url() . $item[self::PROP_CONTROLLER] . '/';
} elseif (isset($item[self::PROP_MODULE]) && $item[self::PROP_MODULE]) {
- 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"