Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Dec 7, 2024
1 parent b25c249 commit 873416b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Target/Mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(array $map)
/**
* @return array<non-empty-string, list<positive-int>>
*/
public function map(TargetCollection $targets): array
public function mapTargets(TargetCollection $targets): array
{
$result = [];

Expand All @@ -67,7 +67,7 @@ public function map(TargetCollection $targets): array
*
* @return array<non-empty-string, list<positive-int>>
*/
private function mapTarget(Target $target): array
public function mapTarget(Target $target): array
{
if (!isset($this->map[$target->key()][$target->target()])) {
throw new InvalidCodeCoverageTargetException($target);
Expand Down
4 changes: 2 additions & 2 deletions tests/tests/Target/MapperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function testMapsTargetValueObjectsToSourceLocations(array $expected, Tar
{
$this->assertSame(
$expected,
$this->mapper(array_keys($expected))->map($targets),
$this->mapper(array_keys($expected))->mapTargets($targets),
);
}

Expand All @@ -189,7 +189,7 @@ public function testCannotMapInvalidTargets(string $exceptionMessage, TargetColl
$this->expectException(InvalidCodeCoverageTargetException::class);
$this->expectExceptionMessage($exceptionMessage);

$this->mapper([])->map($targets);
$this->mapper([])->mapTargets($targets);
}

/**
Expand Down

0 comments on commit 873416b

Please sign in to comment.