Skip to content

Commit b74762e

Browse files
Slamdunksebastianbergmann
authored andcommitted
Generate code coverage report in PHP format as first in list to avoid serializing cache data
1 parent 26f9e78 commit b74762e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/cli/Command.php

+11-11
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,17 @@ protected function handleConfiguration(CodeCoverage $coverage, Arguments $argume
7575

7676
protected function handleReports(CodeCoverage $coverage, Arguments $arguments): void
7777
{
78+
if ($arguments->php()) {
79+
print 'Generating code coverage report in PHP format ... ';
80+
81+
$writer = new PhpReport;
82+
83+
/* @noinspection UnusedFunctionResultInspection */
84+
$writer->process($coverage, $arguments->php());
85+
86+
print 'done' . PHP_EOL;
87+
}
88+
7889
if ($arguments->clover()) {
7990
print 'Generating code coverage report in Clover XML format ... ';
8091

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

121-
if ($arguments->php()) {
122-
print 'Generating code coverage report in PHP format ... ';
123-
124-
$writer = new PhpReport;
125-
126-
/* @noinspection UnusedFunctionResultInspection */
127-
$writer->process($coverage, $arguments->php());
128-
129-
print 'done' . PHP_EOL;
130-
}
131-
132132
if ($arguments->text()) {
133133
print 'Generating code coverage report in text format ... ';
134134

0 commit comments

Comments
 (0)