3
* This file is part of the PHP_CodeCoverage package.
5
* (c) Sebastian Bergmann <sebastian@phpunit.de>
7
* For the full copyright and license information, please view the LICENSE
8
* file that was distributed with this source code.
12
* Uses var_export() to write a PHP_CodeCoverage object to a file.
15
* @package CodeCoverage
16
* @author Sebastian Bergmann <sebastian@phpunit.de>
17
* @author uyga <iamuyga@gmail.com>
18
* @copyright Sebastian Bergmann <sebastian@phpunit.de>
19
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
20
* @link http://github.com/sebastianbergmann/php-code-coverage
21
* @since Class available since Release 1.1.0
23
class PHP_CodeCoverage_Report_PHP
26
* @param PHP_CodeCoverage $coverage
27
* @param string $target
30
public function process(PHP_CodeCoverage $coverage, $target = null)
32
$filter = $coverage->filter();
36
$coverage = new PHP_CodeCoverage;
37
$coverage->setData(%s);
38
$coverage->setTests(%s);
40
$filter = $coverage->filter();
41
$filter->setBlacklistedFiles(%s);
42
$filter->setWhitelistedFiles(%s);
45
var_export($coverage->getData(true), 1),
46
var_export($coverage->getTests(), 1),
47
var_export($filter->getBlacklistedFiles(), 1),
48
var_export($filter->getWhitelistedFiles(), 1)
51
if ($target !== null) {
52
return file_put_contents($target, $output);