Showing 247 of 250 total issues
Function upgrade162
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function upgrade162()
{
global $wpdb;
/**
- 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 upgrade170
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function upgrade170()
{
global $wpdb;
/**
- 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 displayMetaBoxVehicles
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function displayMetaBoxVehicles(WP_Post $post)
{
$vehicleTaxonomy = get_taxonomy(Vehicle::getSlug());
if (empty($vehicleTaxonomy)) {
return;
- 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 renderDateOptions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function renderDateOptions()
{
global $wpdb, $wp_locale;
$months = $wpdb->get_results($wpdb->prepare("
- 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 runImport
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function runImport($preparedInsertArgs, $source, $yearsAffected, $importStatus)
{
// Für die Dauer des Imports sollen die laufenden Nummern nicht aktuell gehalten werden, da dies die Performance
// stark beeinträchtigt
if ($source->isPublishReports()) {
- 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 upgrade113
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function upgrade113()
{
if (!function_exists('get_editable_roles')) {
require_once(ABSPATH . 'wp-admin/includes/user.php');
}
- 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
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return AnnotationIconBar::getInstance()->render($report->getPostId());
Avoid too many return
statements within this method. Open
return array_merge($resourcesByName, $resourcesByAlias);
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return $vehicle->term_id;
Avoid too many return
statements within this method. Open
return join(', ', $vehicleLinks);
Avoid too many return
statements within this method. Open
return $header . '<hr>' . $content;
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return join(', ', $unitLinks);
Avoid too many return
statements within this method. Open
return $newOutput;
Avoid too many return
statements within this method. Open
return '';
Function getSmallScreenCell
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function getSmallScreenCell(IncidentReport $report, Parameters $parameters): string
{
$content = '';
$annotations = '';
- 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"