From 7d3be580a971a37905745d8233db72e86b8e3b4b Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Sun, 14 Jul 2024 22:43:37 +0200 Subject: [PATCH] Correct plural --- src/Diagnose/PHPStanDiagnoseExtension.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Diagnose/PHPStanDiagnoseExtension.php b/src/Diagnose/PHPStanDiagnoseExtension.php index 7a8df87f51..0873b4f802 100644 --- a/src/Diagnose/PHPStanDiagnoseExtension.php +++ b/src/Diagnose/PHPStanDiagnoseExtension.php @@ -71,8 +71,12 @@ public function print(Output $output): void } $output->writeLineFormatted(''); - $output->writeLineFormatted('Discovered Composer project roots:'); - if (count($this->composerAutoloaderProjectPaths) === 0) { + $composerAutoloaderProjectPathsCount = count($this->composerAutoloaderProjectPaths); + $output->writeLineFormatted(sprintf( + 'Discovered Composer project %s:', + $composerAutoloaderProjectPathsCount === 1 ? 'root' : 'roots', + )); + if ($composerAutoloaderProjectPathsCount === 0) { $output->writeLineFormatted('None'); } foreach ($this->composerAutoloaderProjectPaths as $composerAutoloaderProjectPath) {