Skip to content

Commit 72b5839

Browse files
claudedeviantintegral
authored andcommitted
chore: ignore equivalent ReturnRemoval mutation in HarFileRepository::getIds
The return [] at line 49 is an equivalent mutation because without it, scandir() is called on a non-directory path which returns false, and the subsequent if (!$hars) check catches this and returns []. The only difference is a PHP warning which tests are configured to ignore.
1 parent 8eaf8fb commit 72b5839

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Repository/HarFileRepository.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ public function loadMultiple(array $ids = []): \Generator
4646
public function getIds(): array
4747
{
4848
if (!is_dir($this->repositoryPath)) {
49+
// @infection-ignore-all: Equivalent mutation - without this return, scandir()
50+
// returns false for non-directories, caught by the if (!$hars) check below.
4951
return [];
5052
}
5153

0 commit comments

Comments
 (0)