src/Settings/Pages/Advanced.php
The class Advanced has 11 public methods. Consider refactoring Advanced to keep number of public methods under 10. Open
Open
class Advanced extends SubPage
{
/**
* @var array[]
*/
- Read upRead up
- Exclude checks
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
Open
public function addSettingsSections()
{
add_settings_section(
'einsatzvw_settings_permalinks',
__('Permalinks', 'einsatzverwaltung'),
Method addSettingsFields
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function addSettingsFields()
{
add_settings_field(
'einsatzvw_permalinks_base',
__('Base', 'einsatzverwaltung'),
Method registerSettings
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function registerSettings()
{
register_setting(
'einsatzvw_settings_advanced',
'einsatzvw_rewrite_slug',