abrain/einsatzverwaltung

View on GitHub

Showing 198 of 250 total issues

The method getColumnContent() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
Open

    public function getColumnContent($columnId, IncidentReport $report): string
    {
        switch ($columnId) {
            case 'e_nummer':
                $numberString = $report->getNumber();
Severity: Minor
Found in src/Admin/ReportListTable.php by phpmd

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

The method useReportTemplate() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10.
Open

    private function useReportTemplate(): bool
    {
        $useTemplate = get_option('einsatzverwaltung_use_reporttemplate', 'no');

        if ($useTemplate === 'no') {
Severity: Minor
Found in src/Frontend.php by phpmd

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

The method readFile() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
Open

    private function readFile($numLines = null, $requestedFields = array())
    {
        $fieldMap = array();
        if (!empty($requestedFields)) {
            $fields = $this->getFields();
Severity: Minor
Found in src/Import/Sources/Csv.php by phpmd

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

The method create_item() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10.
Open

    public function create_item($request) // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps -- overridden method
    {
        $params = $request->get_params();

        $start_date_time = DateTimeImmutable::createFromFormat(DATE_RFC3339, $params['date_start']);
Severity: Minor
Found in src/Api/Reports.php by phpmd

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

The method savePostdata() has a Cyclomatic Complexity of 21. The configured cyclomatic complexity threshold is 10.
Open

    public function savePostdata(int $postId, WP_Post $post)
    {
        // Schreibrechte prüfen
        if (!current_user_can('edit_einsatzbericht', $postId)) {
            return;
Severity: Minor
Found in src/Data.php by phpmd

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

Don't use IDs in selectors.
Open

#columns-available td, #columns-enabled td {
Severity: Minor
Found in src/css/style-admin.css by csslint

Don't use IDs in selectors.
Open

#fahrzeugdiv summary {
Severity: Minor
Found in src/css/style-edit.css by csslint

Don't use IDs in selectors.
Open

#dashboard_right_now a.einsatz-count:before, #dashboard_right_now span.einsatz-count:before {
Severity: Minor
Found in src/css/style-admin.css by csslint

Don't use IDs in selectors.
Open

#columns-available ul, #columns-enabled ul {
Severity: Minor
Found in src/css/style-admin.css by csslint

Don't use IDs in selectors.
Open

#dashboard_right_now a.einsatz-count:before, #dashboard_right_now span.einsatz-count:before {
Severity: Minor
Found in src/css/style-admin.css by csslint

Don't use IDs in selectors.
Open

#columns-available, #columns-enabled {
Severity: Minor
Found in src/css/style-admin.css by csslint

Don't use IDs in selectors.
Open

    #einsatz_einsatzort, #einsatz_einsatzleiter, #einsatz_mannschaft {
Severity: Minor
Found in src/css/style-edit.css by csslint

Don't use IDs in selectors.
Open

#einsatzverwaltung_meta_box .incidentnumber {
Severity: Minor
Found in src/css/style-edit.css by csslint

Don't use IDs in selectors.
Open

    #einsatz_einsatzort, #einsatz_einsatzleiter, #einsatz_mannschaft {
Severity: Minor
Found in src/css/style-edit.css by csslint

Don't use IDs in selectors.
Open

#columns-available td, #columns-enabled td {
Severity: Minor
Found in src/css/style-admin.css by csslint

Don't use IDs in selectors.
Open

#columns-available, #columns-enabled {
Severity: Minor
Found in src/css/style-admin.css by csslint

Don't use IDs in selectors.
Open

    #einsatz_einsatzort, #einsatz_einsatzleiter, #einsatz_mannschaft {
Severity: Minor
Found in src/css/style-edit.css by csslint

Don't use IDs in selectors.
Open

#columns-available ul, #columns-enabled ul {
Severity: Minor
Found in src/css/style-admin.css by csslint
Severity
Category
Status
Source
Language