Skip to content

Commit 873416b

Browse files
Refactor
1 parent b25c249 commit 873416b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Target/Mapper.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct(array $map)
4141
/**
4242
* @return array<non-empty-string, list<positive-int>>
4343
*/
44-
public function map(TargetCollection $targets): array
44+
public function mapTargets(TargetCollection $targets): array
4545
{
4646
$result = [];
4747

@@ -67,7 +67,7 @@ public function map(TargetCollection $targets): array
6767
*
6868
* @return array<non-empty-string, list<positive-int>>
6969
*/
70-
private function mapTarget(Target $target): array
70+
public function mapTarget(Target $target): array
7171
{
7272
if (!isset($this->map[$target->key()][$target->target()])) {
7373
throw new InvalidCodeCoverageTargetException($target);

tests/tests/Target/MapperTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public function testMapsTargetValueObjectsToSourceLocations(array $expected, Tar
178178
{
179179
$this->assertSame(
180180
$expected,
181-
$this->mapper(array_keys($expected))->map($targets),
181+
$this->mapper(array_keys($expected))->mapTargets($targets),
182182
);
183183
}
184184

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

192-
$this->mapper([])->map($targets);
192+
$this->mapper([])->mapTargets($targets);
193193
}
194194

195195
/**

0 commit comments

Comments
 (0)