Skip to content

Commit

Permalink
Generate code coverage report in PHP format as first in list to avoid…
Browse files Browse the repository at this point in the history
… serializing cache data
  • Loading branch information
Slamdunk authored and sebastianbergmann committed Sep 12, 2023
1 parent 26f9e78 commit b74762e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/cli/Command.php
Expand Up @@ -75,6 +75,17 @@ protected function handleConfiguration(CodeCoverage $coverage, Arguments $argume

protected function handleReports(CodeCoverage $coverage, Arguments $arguments): void
{
if ($arguments->php()) {
print 'Generating code coverage report in PHP format ... ';

$writer = new PhpReport;

/* @noinspection UnusedFunctionResultInspection */
$writer->process($coverage, $arguments->php());

print 'done' . PHP_EOL;
}

if ($arguments->clover()) {
print 'Generating code coverage report in Clover XML format ... ';

Expand Down Expand Up @@ -118,17 +129,6 @@ protected function handleReports(CodeCoverage $coverage, Arguments $arguments):
print 'done' . PHP_EOL;
}

if ($arguments->php()) {
print 'Generating code coverage report in PHP format ... ';

$writer = new PhpReport;

/* @noinspection UnusedFunctionResultInspection */
$writer->process($coverage, $arguments->php());

print 'done' . PHP_EOL;
}

if ($arguments->text()) {
print 'Generating code coverage report in text format ... ';

Expand Down

0 comments on commit b74762e

Please sign in to comment.