Skip to content

Update to CI v4.4.4 #215

Update to CI v4.4.4

Update to CI v4.4.4 #215

Triggered via pull request January 21, 2024 23:24
Status Success
Total duration 38s
Artifacts

infection.yml

on: pull_request
Mutation Testing
29s
Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

5 warnings
Mutation Testing: app/Libraries/Blog.php#L76
Escaped Mutant for Mutator "LogicalNot": --- Original +++ New @@ @@ foreach ($files as $file) { $temp = $this->readPost($this->config->contentPath, $file); // Only collect from the correct category. - if ($category !== null && !in_array($category, $temp->tags, true)) { + if ($category !== null && in_array($category, $temp->tags, true)) { continue; } $posts[] = $temp;
Mutation Testing: app/Libraries/Blog.php#L76
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation": --- Original +++ New @@ @@ foreach ($files as $file) { $temp = $this->readPost($this->config->contentPath, $file); // Only collect from the correct category. - if ($category !== null && !in_array($category, $temp->tags, true)) { + if (!($category !== null) && in_array($category, $temp->tags, true)) { continue; } $posts[] = $temp;
Mutation Testing: app/Libraries/Blog.php#L149
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ $cacheKey = "blog_post_{$slug}"; if (!($post = cache($cacheKey))) { $files = glob("{$this->config->contentPath}*.{$slug}.md"); - if ($files === [] || $files === false) { + if ($files === [] || $files === true) { throw PageNotFoundException::forPageNotFound(); } $post = $this->readPost($this->config->contentPath, basename($files[0]));
Mutation Testing: app/Libraries/Blog.php#L226
Escaped Mutant for Mutator "ProtectedVisibility": --- Original +++ New @@ @@ * * @return Post|null */ - protected function readPost(string $folder, string $filename) + private function readPost(string $folder, string $filename) { $contents = file($folder . $filename); if ($contents === [] || $contents === false) {
Mutation Testing: app/Libraries/Blog.php#L230
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ protected function readPost(string $folder, string $filename) { $contents = file($folder . $filename); - if ($contents === [] || $contents === false) { + if ($contents === [] || $contents === true) { return null; } $post = new Post();