array getInstalledStandardDetails(
[boolean
$includeGeneric = false], [string
$standardsDir = ''])
Get the details of all coding standards installed.
Coding standards are directories located in the CodeSniffer/Standards directory. Valid coding standards include a Sniffs subdirectory.
The details returned for each standard are:
- path: the path to the coding standard's main directory
- name: the name of the coding standard, as sourced from the ruleset.xml file
- namespace: the namespace used by the coding standard, as sourced from the ruleset.xml file
If you only need the paths to the installed standards, use getInstalledStandardPaths() instead as it performs less work to retrieve coding standard names.
- See: getInstalledStandardPaths()
- Access: public
Parameters:
boolean
$includeGeneric
—
If true, the special "Generic" coding standard will be included if installed.
string
$standardsDir
—
A specific directory to look for standards in. If not specified, PHP_CodeSniffer will look in its default locations.
string|null getInstalledStandardPath(
string
$standard)
Return the path of an installed coding standard.
Coding standards are directories located in the CodeSniffer/Standards directory. Valid coding standards include a ruleset.xml file.
Parameters:
string
$standard
—
The name of the coding standard.
array getInstalledStandards(
[boolean
$includeGeneric = false], [string
$standardsDir = ''])
Get a list of all coding standards installed.
Coding standards are directories located in the CodeSniffer/Standards directory. Valid coding standards include a Sniffs subdirectory.
- See: isInstalledStandard()
- Access: public
Parameters:
boolean
$includeGeneric
—
If true, the special "Generic" coding standard will be included if installed.
string
$standardsDir
—
A specific directory to look for standards in. If not specified, PHP_CodeSniffer will look in its default locations.
boolean isInstalledStandard(
string
$standard)
Determine if a standard is installed.
Coding standards are directories located in the CodeSniffer/Standards directory. Valid coding standards include a ruleset.xml file.
- See: getInstalledStandards()
- Access: public
Parameters:
string
$standard
—
The name of the coding standard.