abrain/einsatzverwaltung

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

Summary

Maintainability
B
4 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
{
    /**
     * @var array[]
     */
Severity: Minor
Found in src/Settings/Pages/Advanced.php by phpmd

TooManyPublicMethods

Since: 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'.

Example

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

Method addSettingsSections has 37 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

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

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

      Method registerSettings has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function registerSettings()
          {
              register_setting(
                  'einsatzvw_settings_advanced',
                  'einsatzvw_rewrite_slug',
      Severity: Minor
      Found in src/Settings/Pages/Advanced.php - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status