Skip to content

Commit 8b2c246

Browse files
committed
change away from sprintf
1 parent 97ab95c commit 8b2c246

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/Report/PHP.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,8 @@ final class PHP
2121
{
2222
public function process(CodeCoverage $coverage, ?string $target = null): string
2323
{
24-
$buffer = sprintf(
25-
"<?php
26-
return \unserialize(<<<'END_OF_COVERAGE_SERIALIZATION'%s%s%sEND_OF_COVERAGE_SERIALIZATION%s);",
27-
PHP_EOL,
28-
serialize($coverage),
29-
PHP_EOL,
30-
PHP_EOL
31-
);
24+
$buffer = "<?php
25+
return \unserialize(<<<'END_OF_COVERAGE_SERIALIZATION" . PHP_EOL . serialize($coverage) . PHP_EOL. 'END_OF_COVERAGE_SERIALIZATION' . PHP_EOL . ");";
3226

3327
if ($target !== null) {
3428
Filesystem::createDirectory(dirname($target));

0 commit comments

Comments
 (0)