public function printInstalledStandards()
{
$installedStandards = PHP_CodeSniffer::getInstalledStandards();
$numStandards = count($installedStandards);
if ($numStandards === 0) {
echo 'No coding standards are installed.' . PHP_EOL;
} else {
$lastStandard = array_pop($installedStandards);
if ($numStandards === 1) {
echo "The only coding standard installed is {$lastStandard}" . PHP_EOL;
} else {
$standardList = implode(', ', $installedStandards);
$standardList .= ' and ' . $lastStandard;
echo 'The installed coding standards are ' . $standardList . PHP_EOL;
}
}
}