diff --git a/src/Ruleset.php b/src/Ruleset.php index 7e659706c8..f90e7b6d2b 100644 --- a/src/Ruleset.php +++ b/src/Ruleset.php @@ -249,7 +249,12 @@ public function explain() // one last time and clear the output buffer. $sniffs[] = ''; - echo PHP_EOL."The $this->name standard contains $sniffCount sniffs".PHP_EOL; + $summaryLine = PHP_EOL."The $this->name standard contains 1 sniff".PHP_EOL; + if ($sniffCount !== 1) { + $summaryLine = str_replace('1 sniff', "$sniffCount sniffs", $summaryLine); + } + + echo $summaryLine; ob_start();