Skip to content

Commit 72a906b

Browse files
committedMar 15, 2025
Refactor
1 parent 79e5ef5 commit 72a906b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/Target/Mapper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ public function mapTargets(TargetCollection $targets): array
6767
*/
6868
public function mapTarget(Target $target): array
6969
{
70-
if (!isset($this->map[$target->key()][$target->target()])) {
71-
throw new InvalidCodeCoverageTargetException($target);
70+
if (isset($this->map[$target->key()][$target->target()])) {
71+
return $this->map[$target->key()][$target->target()];
7272
}
7373

74-
return $this->map[$target->key()][$target->target()];
74+
throw new InvalidCodeCoverageTargetException($target);
7575
}
7676

7777
/**

0 commit comments

Comments
 (0)
Failed to load comments.