From af9649b42eb677445159fa067595eaed437a4929 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 27 Nov 2023 12:13:37 +0100 Subject: [PATCH] Improve scanning progress output --- src/Psalm/Progress/DebugProgress.php | 4 ++-- src/Psalm/Progress/LongProgress.php | 6 +++--- tests/MethodSignatureTest.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Psalm/Progress/DebugProgress.php b/src/Psalm/Progress/DebugProgress.php index 3a8fa711787..2bfe8327466 100644 --- a/src/Psalm/Progress/DebugProgress.php +++ b/src/Psalm/Progress/DebugProgress.php @@ -22,12 +22,12 @@ public function debug(string $message): void public function startScanningFiles(): void { - $this->write('Scanning files...' . "\n"); + $this->write("\n" . 'Scanning files...' . "\n\n"); } public function startAnalyzingFiles(): void { - $this->write('Analyzing files...' . "\n"); + $this->write("\n" . 'Analyzing files...' . "\n"); } public function startAlteringFiles(): void diff --git a/src/Psalm/Progress/LongProgress.php b/src/Psalm/Progress/LongProgress.php index 4f7044d7275..8ec228b79da 100644 --- a/src/Psalm/Progress/LongProgress.php +++ b/src/Psalm/Progress/LongProgress.php @@ -36,13 +36,13 @@ public function __construct(bool $print_errors = true, bool $print_infos = true) public function startScanningFiles(): void { $this->fixed_size = false; - $this->write('Scanning files...' . "\n"); + $this->write("\n" . 'Scanning files...' . "\n\n"); } public function startAnalyzingFiles(): void { $this->fixed_size = true; - $this->write("\n" . 'Analyzing files...' . "\n\n"); + $this->write("\n\n" . 'Analyzing files...' . "\n\n"); } public function startAlteringFiles(): void @@ -78,7 +78,7 @@ public function taskDone(int $level): void if (!$this->fixed_size) { if ($this->progress == 1 || $this->progress == $this->number_of_tasks || $this->progress % 10 == 0) { $this->write(sprintf( - "\r%s / %s?", + "\r%s / %s...", $this->progress, $this->number_of_tasks, )); diff --git a/tests/MethodSignatureTest.php b/tests/MethodSignatureTest.php index 18609a2ccb9..5e76b8c0b85 100644 --- a/tests/MethodSignatureTest.php +++ b/tests/MethodSignatureTest.php @@ -927,7 +927,7 @@ final class B implements I public function a(mixed $a): void {} }', 'assertions' => [], - 'ignored_errors' => [], + 'ignored_issues' => [], 'php_version' => '8.0', ], 'doesNotRequireInterfaceDestructorsToHaveReturnType' => [