abrain/einsatzverwaltung

View on GitHub
src/Settings/Pages/Advanced.php

Summary

Maintainability
A
2 hrs
Test Coverage
F
0%

The class Advanced has 11 public methods. Consider refactoring Advanced to keep number of public methods under 10.
Open

class Advanced extends SubPage
{
    private $permalinkOptions = array(
        PermalinkController::DEFAULT_REPORT_PERMALINK => array(
            'label' => 'Beitragstitel mit angehängtem Zähler (Standard)'
Severity: Minor
Found in src/Settings/Pages/Advanced.php by phpmd

Since: PHPMD 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects. By default it ignores methods starting with 'get' or 'set'.

Source: http://phpmd.org/rules/codesize.txt

Method addSettingsFields has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function addSettingsFields()
    {
        add_settings_field(
            'einsatzvw_permalinks_base',
            'Basis',
Severity: Minor
Found in src/Settings/Pages/Advanced.php - About 1 hr to fix

    Method addSettingsSections has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function addSettingsSections()
        {
            add_settings_section(
                'einsatzvw_settings_permalinks',
                __('Permalinks', 'einsatzverwaltung'),
    Severity: Minor
    Found in src/Settings/Pages/Advanced.php - About 1 hr to fix

      Line exceeds 120 characters; contains 154 characters
      Open

              echo '<p class="description">Diese Funktionen, die du von Beitr&auml;gen kennst, k&ouml;nnen auch f&uuml;r Einsatzberichte aktiviert werden.</p>';

      Line exceeds 120 characters; contains 163 characters
      Open

              echo '<p>Die erweiterten Einstellungen k&ouml;nnen weitreichende Konsequenzen haben und sollten entsprechend nicht leichtfertig ge&auml;ndert werden.</p>';

      Line exceeds 120 characters; contains 225 characters
      Open

                      echo '<p>Eine &Auml;nderung der Permalinkstruktur hat zur Folge, dass bisherige Links auf Einsatzberichte nicht mehr funktionieren. Dem solltest du als Seitenbetreiber mit Weiterleitungen entgegenwirken.</p>';

      Line exceeds 120 characters; contains 249 characters
      Open

                  __('By default, WordPress uses the post name to build the URL. To ensure uniqueness across posts, the post name can have a number appended if there are other posts with the same title (e.g. %1$s, %2$s, %3$s, ...).', 'einsatzverwaltung'),

      Line exceeds 120 characters; contains 121 characters
      Open

              $this->echoSettingsCheckbox('einsatz_disable_blockeditor', 'Block-Editor f&uuml;r Einsatzberichte deaktivieren');

      There are no issues that match your filters.

      Category
      Status