Skip to content

Commit b46b7dd

Browse files
committed
pluralisation
1 parent 28df52f commit b46b7dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Plugin.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ function (Result $result) use (&$filesWithProfanity, &$totalProfanities): void {
180180
$this->profanityLogger->output();
181181

182182
if ($exitCode === 1) {
183-
Output::errorMessage("Found $totalProfanities instances of profanity in $filesWithProfanityCount files");
183+
$instanceWord = $totalProfanities === 1 ? 'instance' : 'instances';
184+
$filesWord = $filesWithProfanityCount === 1 ? 'file' : 'files';
185+
Output::errorMessage("Found $totalProfanities $instanceWord of profanity in $filesWithProfanityCount $filesWord");
184186
} else {
185187
Output::successMessage('No profanity found in your application!');
186188
}

0 commit comments

Comments
 (0)