Skip to content

Commit

Permalink
Ignore code from code coverage that cannot be covered as it is only e…
Browse files Browse the repository at this point in the history
…xecuted when code coverage data is not collected
  • Loading branch information
sebastianbergmann committed Dec 15, 2024
1 parent 4163491 commit f4384f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Driver/PcovDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public function __construct(Filter $filter)
$this->filter = $filter;
}

/**
* @codeCoverageIgnore
*/
public function start(): void
{
start();
Expand All @@ -47,6 +50,7 @@ public function stop(): RawCodeCoverageData
{
stop();

// @codeCoverageIgnoreStart
$filesToCollectCoverageFor = waiting();
$collected = [];

Expand All @@ -61,6 +65,7 @@ public function stop(): RawCodeCoverageData
}

return RawCodeCoverageData::fromXdebugWithoutPathCoverage($collected);
// @codeCoverageIgnoreEnd
}

public function nameAndVersion(): string
Expand Down

0 comments on commit f4384f1

Please sign in to comment.