diff --git a/public/scanner/sw.js b/public/scanner/sw.js index 597e346..a157f27 100644 --- a/public/scanner/sw.js +++ b/public/scanner/sw.js @@ -1,7 +1,7 @@ const CACHE_NAME = 'scanner-v1'; const ASSETS = [ - '/scanner', - 'https://unpkg.com/html5-qrcode@2.3.8/html5-qrcode.min.js', + '/scanner/', + 'https://cdn.jsdelivr.net/npm/html5-qrcode@2.3.8/html5-qrcode.min.js', ]; self.addEventListener('install', (e) => { diff --git a/src/Command/MeilisearchConsistencyCommand.php b/src/Command/MeilisearchConsistencyCommand.php index 2e677c5..d6c4062 100644 --- a/src/Command/MeilisearchConsistencyCommand.php +++ b/src/Command/MeilisearchConsistencyCommand.php @@ -25,6 +25,8 @@ use Symfony\Component\Console\Style\SymfonyStyle; )] class MeilisearchConsistencyCommand extends Command { + private const INDEX_MISSING_MSG = ' [%s] Index missing'; + public function __construct( private MeilisearchService $meilisearch, private EntityManagerInterface $em, @@ -54,7 +56,7 @@ class MeilisearchConsistencyCommand extends Command return Command::FAILURE; } - [$totalOrphans, $totalMissing] = $this->checkAllIndexes($indexes, $fix, $io); + [$totalOrphans, $totalMissing] = $this->checkAllIndexes($fix, $io); $this->reportSummary($io, $totalOrphans, $totalMissing, $fix); @@ -62,11 +64,9 @@ class MeilisearchConsistencyCommand extends Command } /** - * @param list $indexes - * * @return array{int, int} */ - private function checkAllIndexes(array $indexes, bool $fix, SymfonyStyle $io): array + private function checkAllIndexes(bool $fix, SymfonyStyle $io): array { $totals = [0, 0]; @@ -160,7 +160,7 @@ class MeilisearchConsistencyCommand extends Command $indexExists = $this->meilisearch->indexExists($index); if (!$indexExists && !$fix) { - $io->text(sprintf(' [%s] Index missing', $index)); + $io->text(sprintf(self::INDEX_MISSING_MSG, $index)); return [0, 0]; } @@ -215,7 +215,7 @@ class MeilisearchConsistencyCommand extends Command $indexExists = $this->meilisearch->indexExists($index); if (!$indexExists && !$fix) { - $io->text(sprintf(' [%s] Index missing', $index)); + $io->text(sprintf(self::INDEX_MISSING_MSG, $index)); return [0, 0]; } @@ -257,7 +257,7 @@ class MeilisearchConsistencyCommand extends Command $indexExists = $this->meilisearch->indexExists($index); if (!$indexExists && !$fix) { - $io->text(sprintf(' [%s] Index missing', $index)); + $io->text(sprintf(self::INDEX_MISSING_MSG, $index)); return [0, 0]; }