1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Merge pull request #10415 from nicelocal/improve_scan_progress

Improve scan progress
This commit is contained in:
orklah 2023-11-27 19:22:34 +01:00 committed by GitHub
commit a3024adc46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -22,12 +22,12 @@ final class DebugProgress extends Progress
public function startScanningFiles(): void public function startScanningFiles(): void
{ {
$this->write('Scanning files...' . "\n"); $this->write("\n" . 'Scanning files...' . "\n\n");
} }
public function startAnalyzingFiles(): void public function startAnalyzingFiles(): void
{ {
$this->write('Analyzing files...' . "\n"); $this->write("\n" . 'Analyzing files...' . "\n");
} }
public function startAlteringFiles(): void public function startAlteringFiles(): void

View File

@ -36,13 +36,13 @@ class LongProgress extends Progress
public function startScanningFiles(): void public function startScanningFiles(): void
{ {
$this->fixed_size = false; $this->fixed_size = false;
$this->write('Scanning files...' . "\n"); $this->write("\n" . 'Scanning files...' . "\n\n");
} }
public function startAnalyzingFiles(): void public function startAnalyzingFiles(): void
{ {
$this->fixed_size = true; $this->fixed_size = true;
$this->write("\n" . 'Analyzing files...' . "\n\n"); $this->write("\n\n" . 'Analyzing files...' . "\n\n");
} }
public function startAlteringFiles(): void public function startAlteringFiles(): void
@ -78,7 +78,7 @@ class LongProgress extends Progress
if (!$this->fixed_size) { if (!$this->fixed_size) {
if ($this->progress == 1 || $this->progress == $this->number_of_tasks || $this->progress % 10 == 0) { if ($this->progress == 1 || $this->progress == $this->number_of_tasks || $this->progress % 10 == 0) {
$this->write(sprintf( $this->write(sprintf(
"\r%s / %s?", "\r%s / %s...",
$this->progress, $this->progress,
$this->number_of_tasks, $this->number_of_tasks,
)); ));