From a65de22540b4b7ed1072b7539e738c7c99c32a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Tue, 1 Oct 2024 16:03:06 +0200 Subject: [PATCH] Console: show stats --- src/Command/CraftCommand.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Command/CraftCommand.php b/src/Command/CraftCommand.php index 49e3580..4f4201a 100644 --- a/src/Command/CraftCommand.php +++ b/src/Command/CraftCommand.php @@ -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; @@ -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; }