function Standards::getInstalledStandardPaths
Get a list of paths where standards are installed.
Unresolvable relative paths will be excluded from the results.
Return value
array
3 calls to Standards::getInstalledStandardPaths()
- Standards::getInstalledStandardDetails in vendor/
squizlabs/ php_codesniffer/ src/ Util/ Standards.php - Get the details of all coding standards installed.
- Standards::getInstalledStandardPath in vendor/
squizlabs/ php_codesniffer/ src/ Util/ Standards.php - Return the path of an installed coding standard.
- Standards::getInstalledStandards in vendor/
squizlabs/ php_codesniffer/ src/ Util/ Standards.php - Get a list of all coding standards installed.
File
-
vendor/
squizlabs/ php_codesniffer/ src/ Util/ Standards.php, line 26
Class
Namespace
PHP_CodeSniffer\UtilCode
public static function getInstalledStandardPaths() {
$ds = DIRECTORY_SEPARATOR;
$installedPaths = [
dirname(dirname(__DIR__)) . $ds . 'src' . $ds . 'Standards',
];
$configPaths = Config::getConfigData('installed_paths');
if ($configPaths !== null) {
$installedPaths = array_merge($installedPaths, explode(',', $configPaths));
}
$resolvedInstalledPaths = [];
foreach ($installedPaths as $installedPath) {
if (substr($installedPath, 0, 1) === '.') {
$installedPath = Common::realPath(__DIR__ . $ds . '..' . $ds . '..' . $ds . $installedPath);
if ($installedPath === false) {
continue;
}
}
$resolvedInstalledPaths[] = $installedPath;
}
return $resolvedInstalledPaths;
}