felixarntz/wp-site-identity

View on GitHub
src/admin-pages/settings-fields/class-wp-site-identity-standard-settings-field-registry.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '49', column '24').
Open

        $this->factory = new WP_Site_Identity_Settings_Field_Factory( $this );

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '76', column '14').
Open

            throw new WP_Site_Identity_Settings_Field_Not_Found_Exception( sprintf( __( 'The settings field with the slug %s could not be found.', 'wp-site-identity' ), $slug ) );

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Avoid excessively long class names like WP_Site_Identity_Standard_Settings_Field_Registry. Keep class name length under 40.
Open

class WP_Site_Identity_Standard_Settings_Field_Registry implements WP_Site_Identity_Settings_Field_Registry {

    /**
     * All registered settings fields as `$slug => $instance` pairs.
     *

LongClassName

Since: 2.9

Detects when classes or interfaces are declared with excessively long names.

Example

class ATooLongClassNameThatHintsAtADesignProblem {

}

interface ATooLongInterfaceNameThatHintsAtADesignProblem {

}

Source https://phpmd.org/rules/naming.html#longclassname

There are no issues that match your filters.

Category
Status