diff --git a/src/flextype/core/Console/Commands/Cache/CacheClearCommand.php b/src/flextype/core/Console/Commands/Cache/CacheClearCommand.php index 14ddac75..feb2efe5 100644 --- a/src/flextype/core/Console/Commands/Cache/CacheClearCommand.php +++ b/src/flextype/core/Console/Commands/Cache/CacheClearCommand.php @@ -19,7 +19,6 @@ namespace Flextype\Console\Commands\Cache; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Input\InputOption; use function Thermage\div; use function Thermage\renderToString; @@ -34,8 +33,6 @@ class CacheClearCommand extends Command protected function execute(InputInterface $input, OutputInterface $output): int { - $io = new SymfonyStyle($input, $output); - $path = PATH['tmp']; if (filesystem()->directory($path)->exists()) { diff --git a/src/flextype/core/Console/Commands/Cache/CacheClearConfigCommand.php b/src/flextype/core/Console/Commands/Cache/CacheClearConfigCommand.php index daaca86c..ceaa2668 100644 --- a/src/flextype/core/Console/Commands/Cache/CacheClearConfigCommand.php +++ b/src/flextype/core/Console/Commands/Cache/CacheClearConfigCommand.php @@ -19,7 +19,6 @@ namespace Flextype\Console\Commands\Cache; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Input\InputOption; use function Thermage\div; use function Thermage\renderToString; @@ -34,8 +33,6 @@ class CacheClearConfigCommand extends Command protected function execute(InputInterface $input, OutputInterface $output): int { - $io = new SymfonyStyle($input, $output); - $configPath = PATH['tmp'] . '/config'; if (filesystem()->directory($configPath)->exists()) { diff --git a/src/flextype/core/Console/Commands/Cache/CacheDeleteCommand.php b/src/flextype/core/Console/Commands/Cache/CacheDeleteCommand.php index 51969117..40104973 100644 --- a/src/flextype/core/Console/Commands/Cache/CacheDeleteCommand.php +++ b/src/flextype/core/Console/Commands/Cache/CacheDeleteCommand.php @@ -20,6 +20,8 @@ use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Input\InputArgument; +use function Thermage\div; +use function Thermage\renderToString; class CacheDeleteCommand extends Command { @@ -36,9 +38,21 @@ class CacheDeleteCommand extends Command if (cache()->delete($key)) { $io->success('Cache item with key ' . $key . ' deleted.'); + $output->write( + renderToString( + div('Success: Cache item with key ' . $key . ' created.', + 'bg-success px-2 py-1') + ) + ); return Command::SUCCESS; } else { $io->error('Cache item with key ' . $key . ' wasn\'t deleted.'); + $output->write( + renderToString( + div('Success: Cache item with key ' . $key . ' created.', + 'bg-success px-2 py-1') + ) + ); return Command::FAILURE; } }