From 8f8f86001f89d3aec2486fe0b18ad0d0c8be897a Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Mon, 18 Dec 2023 21:34:36 +0100 Subject: [PATCH] Refactor WorkboxInitCommand class and remove extra line Simplified the annotation and constructor on the `WorkboxInitCommand` class to enhance readability. In addition, removed a superfluous empty line. This refactor contributes to cleaner code and easier maintenance. --- src/Command/WorkboxInitCommand.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Command/WorkboxInitCommand.php b/src/Command/WorkboxInitCommand.php index a83df96..9607199 100644 --- a/src/Command/WorkboxInitCommand.php +++ b/src/Command/WorkboxInitCommand.php @@ -14,11 +14,9 @@ use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Path; use Symfony\Component\HttpKernel\Config\FileLocator; +use function count; -#[AsCommand( - name: 'pwa:sw', - description: 'Initializes the Workbox-based Service Worker.', -)] +#[AsCommand(name: 'pwa:sw', description: 'Initializes the Workbox-based Service Worker.',)] class WorkboxInitCommand extends Command { public function __construct( @@ -64,7 +62,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int $resourcePath = $resourcePath[0]; $this->filesystem->copy($resourcePath, $publicFolder . $outputFile); - $io->success('Workbox is ready to use!'); return self::SUCCESS;