src/shortcodes/class-wp-site-identity-standard-shortcode-registry.php
Missing class import via use statement (line '52', column '24'). Open
Open
$this->factory = new WP_Site_Identity_Shortcode_Factory( $this );
- Read upRead up
- Exclude checks
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 '79', column '14'). Open
Open
throw new WP_Site_Identity_Shortcode_Not_Found_Exception( sprintf( __( 'The shortcode with the tag %s could not be found.', 'wp-site-identity' ), $tag ) );
- Read upRead up
- Exclude checks
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_Shortcode_Registry. Keep class name length under 40. Open
Open
class WP_Site_Identity_Standard_Shortcode_Registry implements WP_Site_Identity_Shortcode_Registry {
/**
* Prefix to use for all shortcode tags within WordPress.
*
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}