diff options
author | Andrew Dolgov <[email protected]> | 2023-12-02 17:45:25 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2023-12-02 18:03:06 +0300 |
commit | 09898ccbc87b5e297bcfab4527a3705bd3b4d5a4 (patch) | |
tree | ebb1e6ebe21782f4c1a757a00af1316ca645b69e /vendor/phpunit/php-code-coverage/src/Report/PHP.php | |
parent | 2b8e34453234b8b31ebc9e7020f8677bf3889898 (diff) |
add phpunit code coverage driver
Diffstat (limited to 'vendor/phpunit/php-code-coverage/src/Report/PHP.php')
-rw-r--r-- | vendor/phpunit/php-code-coverage/src/Report/PHP.php | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/vendor/phpunit/php-code-coverage/src/Report/PHP.php b/vendor/phpunit/php-code-coverage/src/Report/PHP.php index d16b1b84f..ccb104ce5 100644 --- a/vendor/phpunit/php-code-coverage/src/Report/PHP.php +++ b/vendor/phpunit/php-code-coverage/src/Report/PHP.php @@ -12,7 +12,6 @@ namespace SebastianBergmann\CodeCoverage\Report; use function dirname; use function file_put_contents; use function serialize; -use function sprintf; use SebastianBergmann\CodeCoverage\CodeCoverage; use SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException; use SebastianBergmann\CodeCoverage\Util\Filesystem; @@ -21,14 +20,8 @@ final class PHP { public function process(CodeCoverage $coverage, ?string $target = null): string { - $buffer = sprintf( - "<?php -return \unserialize(<<<'END_OF_COVERAGE_SERIALIZATION'%s%s%sEND_OF_COVERAGE_SERIALIZATION%s);", - PHP_EOL, - serialize($coverage), - PHP_EOL, - PHP_EOL - ); + $buffer = "<?php +return \unserialize(<<<'END_OF_COVERAGE_SERIALIZATION'" . PHP_EOL . serialize($coverage) . PHP_EOL . 'END_OF_COVERAGE_SERIALIZATION' . PHP_EOL . ');'; if ($target !== null) { Filesystem::createDirectory(dirname($target)); |