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) {