Skip to content

Commit

Permalink
Improve scanning progress output
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Nov 27, 2023
1 parent baa6d5d commit af9649b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Psalm/Progress/DebugProgress.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/Psalm/Progress/LongProgress.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
));
Expand Down
2 changes: 1 addition & 1 deletion tests/MethodSignatureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [
Expand Down

0 comments on commit af9649b

Please sign in to comment.