Skip to content

Commit

Permalink
Console: show stats
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Oct 1, 2024
1 parent ba3e5ff commit a65de22
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Command/CraftCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Nette\Schema\Expect;
use Nette\Schema\Processor;
use Nette\Schema\ValidationException;
use Nette\Utils\Arrays;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
Expand Down Expand Up @@ -104,6 +105,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
]);
}

$ui->info(sprintf('Crafted: %d files', count(Arrays::filter($result->items, fn ($item) => $item['state'] === 'crafted'))));

return Command::SUCCESS;
}

Expand Down

0 comments on commit a65de22

Please sign in to comment.