Skip to content

Commit

Permalink
Refactor WorkboxInitCommand class and remove extra line
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Spomky committed Dec 18, 2023
1 parent e9eba2b commit 8f8f860
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Command/WorkboxInitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 8f8f860

Please sign in to comment.