Skip to content

Commit 4c5af31

Browse files
committed
Merge branch 'feature/ruleset-explain-plural-vs-singular' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents 8fd9d04 + da0c874 commit 4c5af31

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Ruleset.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,12 @@ public function explain()
249249
// one last time and clear the output buffer.
250250
$sniffs[] = '';
251251

252-
echo PHP_EOL."The $this->name standard contains $sniffCount sniffs".PHP_EOL;
252+
$summaryLine = PHP_EOL."The $this->name standard contains 1 sniff".PHP_EOL;
253+
if ($sniffCount !== 1) {
254+
$summaryLine = str_replace('1 sniff', "$sniffCount sniffs", $summaryLine);
255+
}
256+
257+
echo $summaryLine;
253258

254259
ob_start();
255260

0 commit comments

Comments
 (0)