Skip to content

Commit

Permalink
Merge branch 'feature/ruleset-explain-plural-vs-singular' of https://…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Dec 22, 2022
2 parents 8fd9d04 + da0c874 commit 4c5af31
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Ruleset.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 4c5af31

Please sign in to comment.