Skip to content

Commit

Permalink
Display a little bit more information with the progress bar during sc…
Browse files Browse the repository at this point in the history
…anning/parsing.
  • Loading branch information
tomzx committed Jan 16, 2015
1 parent a684d35 commit d55a2f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/PHPSemVerChecker/Console/Command/CompareCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,17 @@ protected function execute(InputInterface $input, OutputInterface $output)
$sourceAfter = $input->getArgument('source-after');
$sourceAfter = $fileIterator->getFilesAsArray($sourceAfter, '.php');

$output->writeln('');

$progress = new ProgressBar($output, count($sourceBefore) + count($sourceAfter));
$progress->setFormat("%message%\n%current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%");
$progress->setMessage('Scanning before files');
foreach ($sourceBefore as $file) {
$scannerBefore->scan($file);
$progress->advance();
}

$progress->setMessage('Scanning after files');
foreach ($sourceAfter as $file) {
$scannerAfter->scan($file);
$progress->advance();
Expand Down

0 comments on commit d55a2f8

Please sign in to comment.