Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate code coverage report in PHP format as first in list to avoid serializing cache data #134

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/cli/Command.php
Original file line number Diff line number Diff line change
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
Loading