Skip to content

Add new Stimulus controllers and improve script environment handling … #29

Add new Stimulus controllers and improve script environment handling …

Add new Stimulus controllers and improve script environment handling … #29

Triggered via push October 2, 2024 20:24
Status Success
Total duration 1m 57s
Artifacts

infection.yml

on: push
0️⃣ Mutation Testing
1m 50s
0️⃣ Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
0️⃣ Mutation Testing: src/CachingStrategy/FontCache.php#L51
Escaped Mutant for Mutator "ArrayItemRemoval": @@ @@ public function getCacheStrategies(): array { $this->logger->debug('Getting cache strategies for fonts'); - $urls = json_decode($this->serializer->serialize($this->getFonts(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), true); + $urls = json_decode($this->serializer->serialize($this->getFonts(), 'json', []), true); $maxEntries = count($urls) + ($this->workbox->fontCache->maxEntries ?? 60); $strategy = WorkboxCacheStrategy::create($this->workbox->enabled && $this->workbox->fontCache->enabled, true, CacheStrategyInterface::STRATEGY_CACHE_FIRST, "({request}) => request.destination === 'font'")->withName($this->workbox->fontCache->cacheName ?? 'fonts')->withMethod('GET')->withPlugin(CacheableResponsePlugin::create(), ExpirationPlugin::create($maxEntries, $this->workbox->fontCache->maxAgeInSeconds() ?? 60 * 60 * 24 * 365)); if (count($urls) > 0) {
0️⃣ Mutation Testing: src/CachingStrategy/AssetCache.php#L46
Escaped Mutant for Mutator "BitwiseOr": @@ @@ { $this->workbox = $serviceWorker->workbox; $this->assetPublicPrefix = rtrim($publicAssetsPathResolver->resolvePublicPath(''), '/'); - $options = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR; + $options = (JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) & JSON_THROW_ON_ERROR; if ($debug === true) { $options |= JSON_PRETTY_PRINT; }
0️⃣ Mutation Testing: src/CachingStrategy/AssetCache.php#L47
Escaped Mutant for Mutator "Identical": @@ @@ $this->workbox = $serviceWorker->workbox; $this->assetPublicPrefix = rtrim($publicAssetsPathResolver->resolvePublicPath(''), '/'); $options = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR; - if ($debug === true) { + if ($debug !== true) { $options |= JSON_PRETTY_PRINT; } $this->jsonOptions = $options;
0️⃣ Mutation Testing: src/CachingStrategy/AssetCache.php#L58
Escaped Mutant for Mutator "ArrayItem": @@ @@ public function getCacheStrategies(): array { $this->logger->debug('Getting cache strategies for assets'); - $urls = json_decode($this->serializer->serialize($this->getAssets(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), true); + $urls = json_decode($this->serializer->serialize($this->getAssets(), 'json', [JsonEncode::OPTIONS > $this->jsonOptions]), true); $strategy = WorkboxCacheStrategy::create($this->workbox->enabled && $this->workbox->assetCache->enabled, true, CacheStrategyInterface::STRATEGY_CACHE_FIRST, sprintf("({url}) => url.pathname.startsWith('%s')", $this->assetPublicPrefix))->withName($this->workbox->assetCache->cacheName)->withPlugin(ExpirationPlugin::create(count($this->getAssets()) * 2, $this->workbox->assetCache->maxAgeInSeconds() ?? 60 * 60 * 24 * 365)); if (count($urls) > 0) { $strategy = $strategy->withPreloadUrl(...$urls);
0️⃣ Mutation Testing: src/CachingStrategy/FontCache.php#L54
Escaped Mutant for Mutator "IncrementInteger": @@ @@ { $this->logger->debug('Getting cache strategies for fonts'); $urls = json_decode($this->serializer->serialize($this->getFonts(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), true); - $maxEntries = count($urls) + ($this->workbox->fontCache->maxEntries ?? 60); + $maxEntries = count($urls) + ($this->workbox->fontCache->maxEntries ?? 61); $strategy = WorkboxCacheStrategy::create($this->workbox->enabled && $this->workbox->fontCache->enabled, true, CacheStrategyInterface::STRATEGY_CACHE_FIRST, "({request}) => request.destination === 'font'")->withName($this->workbox->fontCache->cacheName ?? 'fonts')->withMethod('GET')->withPlugin(CacheableResponsePlugin::create(), ExpirationPlugin::create($maxEntries, $this->workbox->fontCache->maxAgeInSeconds() ?? 60 * 60 * 24 * 365)); if (count($urls) > 0) { $strategy = $strategy->withPreloadUrl(...$urls);
0️⃣ Mutation Testing: src/CachingStrategy/FontCache.php#L57
Escaped Mutant for Mutator "LogicalAnd": @@ @@ $this->logger->debug('Getting cache strategies for fonts'); $urls = json_decode($this->serializer->serialize($this->getFonts(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), true); $maxEntries = count($urls) + ($this->workbox->fontCache->maxEntries ?? 60); - $strategy = WorkboxCacheStrategy::create($this->workbox->enabled && $this->workbox->fontCache->enabled, true, CacheStrategyInterface::STRATEGY_CACHE_FIRST, "({request}) => request.destination === 'font'")->withName($this->workbox->fontCache->cacheName ?? 'fonts')->withMethod('GET')->withPlugin(CacheableResponsePlugin::create(), ExpirationPlugin::create($maxEntries, $this->workbox->fontCache->maxAgeInSeconds() ?? 60 * 60 * 24 * 365)); + $strategy = WorkboxCacheStrategy::create($this->workbox->enabled || $this->workbox->fontCache->enabled, true, CacheStrategyInterface::STRATEGY_CACHE_FIRST, "({request}) => request.destination === 'font'")->withName($this->workbox->fontCache->cacheName ?? 'fonts')->withMethod('GET')->withPlugin(CacheableResponsePlugin::create(), ExpirationPlugin::create($maxEntries, $this->workbox->fontCache->maxAgeInSeconds() ?? 60 * 60 * 24 * 365)); if (count($urls) > 0) { $strategy = $strategy->withPreloadUrl(...$urls); }
0️⃣ Mutation Testing: src/CachingStrategy/FontCache.php#L57
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation": @@ @@ $this->logger->debug('Getting cache strategies for fonts'); $urls = json_decode($this->serializer->serialize($this->getFonts(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), true); $maxEntries = count($urls) + ($this->workbox->fontCache->maxEntries ?? 60); - $strategy = WorkboxCacheStrategy::create($this->workbox->enabled && $this->workbox->fontCache->enabled, true, CacheStrategyInterface::STRATEGY_CACHE_FIRST, "({request}) => request.destination === 'font'")->withName($this->workbox->fontCache->cacheName ?? 'fonts')->withMethod('GET')->withPlugin(CacheableResponsePlugin::create(), ExpirationPlugin::create($maxEntries, $this->workbox->fontCache->maxAgeInSeconds() ?? 60 * 60 * 24 * 365)); + $strategy = WorkboxCacheStrategy::create(!$this->workbox->enabled && !$this->workbox->fontCache->enabled, true, CacheStrategyInterface::STRATEGY_CACHE_FIRST, "({request}) => request.destination === 'font'")->withName($this->workbox->fontCache->cacheName ?? 'fonts')->withMethod('GET')->withPlugin(CacheableResponsePlugin::create(), ExpirationPlugin::create($maxEntries, $this->workbox->fontCache->maxAgeInSeconds() ?? 60 * 60 * 24 * 365)); if (count($urls) > 0) { $strategy = $strategy->withPreloadUrl(...$urls); }
0️⃣ Mutation Testing: src/CachingStrategy/FontCache.php#L58
Escaped Mutant for Mutator "TrueValue": @@ @@ $this->logger->debug('Getting cache strategies for fonts'); $urls = json_decode($this->serializer->serialize($this->getFonts(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), true); $maxEntries = count($urls) + ($this->workbox->fontCache->maxEntries ?? 60); - $strategy = WorkboxCacheStrategy::create($this->workbox->enabled && $this->workbox->fontCache->enabled, true, CacheStrategyInterface::STRATEGY_CACHE_FIRST, "({request}) => request.destination === 'font'")->withName($this->workbox->fontCache->cacheName ?? 'fonts')->withMethod('GET')->withPlugin(CacheableResponsePlugin::create(), ExpirationPlugin::create($maxEntries, $this->workbox->fontCache->maxAgeInSeconds() ?? 60 * 60 * 24 * 365)); + $strategy = WorkboxCacheStrategy::create($this->workbox->enabled && $this->workbox->fontCache->enabled, false, CacheStrategyInterface::STRATEGY_CACHE_FIRST, "({request}) => request.destination === 'font'")->withName($this->workbox->fontCache->cacheName ?? 'fonts')->withMethod('GET')->withPlugin(CacheableResponsePlugin::create(), ExpirationPlugin::create($maxEntries, $this->workbox->fontCache->maxAgeInSeconds() ?? 60 * 60 * 24 * 365)); if (count($urls) > 0) { $strategy = $strategy->withPreloadUrl(...$urls); }
0️⃣ Mutation Testing: src/CachingStrategy/FontCache.php#L68
Escaped Mutant for Mutator "DecrementInteger": @@ @@ $this->logger->debug('Getting cache strategies for fonts'); $urls = json_decode($this->serializer->serialize($this->getFonts(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), true); $maxEntries = count($urls) + ($this->workbox->fontCache->maxEntries ?? 60); - $strategy = WorkboxCacheStrategy::create($this->workbox->enabled && $this->workbox->fontCache->enabled, true, CacheStrategyInterface::STRATEGY_CACHE_FIRST, "({request}) => request.destination === 'font'")->withName($this->workbox->fontCache->cacheName ?? 'fonts')->withMethod('GET')->withPlugin(CacheableResponsePlugin::create(), ExpirationPlugin::create($maxEntries, $this->workbox->fontCache->maxAgeInSeconds() ?? 60 * 60 * 24 * 365)); + $strategy = WorkboxCacheStrategy::create($this->workbox->enabled && $this->workbox->fontCache->enabled, true, CacheStrategyInterface::STRATEGY_CACHE_FIRST, "({request}) => request.destination === 'font'")->withName($this->workbox->fontCache->cacheName ?? 'fonts')->withMethod('GET')->withPlugin(CacheableResponsePlugin::create(), ExpirationPlugin::create($maxEntries, $this->workbox->fontCache->maxAgeInSeconds() ?? 59 * 60 * 24 * 365)); if (count($urls) > 0) { $strategy = $strategy->withPreloadUrl(...$urls); }
0️⃣ Mutation Testing: src/CachingStrategy/FontCache.php#L68
Escaped Mutant for Mutator "IncrementInteger": @@ @@ $this->logger->debug('Getting cache strategies for fonts'); $urls = json_decode($this->serializer->serialize($this->getFonts(), 'json', [JsonEncode::OPTIONS => $this->jsonOptions]), true); $maxEntries = count($urls) + ($this->workbox->fontCache->maxEntries ?? 60); - $strategy = WorkboxCacheStrategy::create($this->workbox->enabled && $this->workbox->fontCache->enabled, true, CacheStrategyInterface::STRATEGY_CACHE_FIRST, "({request}) => request.destination === 'font'")->withName($this->workbox->fontCache->cacheName ?? 'fonts')->withMethod('GET')->withPlugin(CacheableResponsePlugin::create(), ExpirationPlugin::create($maxEntries, $this->workbox->fontCache->maxAgeInSeconds() ?? 60 * 60 * 24 * 365)); + $strategy = WorkboxCacheStrategy::create($this->workbox->enabled && $this->workbox->fontCache->enabled, true, CacheStrategyInterface::STRATEGY_CACHE_FIRST, "({request}) => request.destination === 'font'")->withName($this->workbox->fontCache->cacheName ?? 'fonts')->withMethod('GET')->withPlugin(CacheableResponsePlugin::create(), ExpirationPlugin::create($maxEntries, $this->workbox->fontCache->maxAgeInSeconds() ?? 61 * 60 * 24 * 365)); if (count($urls) > 0) { $strategy = $strategy->withPreloadUrl(...$urls); }