private function PHP_CodeCoverage_Driver_Xdebug::cleanup in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php \PHP_CodeCoverage_Driver_Xdebug::cleanup()
@since Method available since Release 2.0.0
Parameters
array $data:
Return value
array
1 call to PHP_CodeCoverage_Driver_Xdebug::cleanup()
- PHP_CodeCoverage_Driver_Xdebug::stop in vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage/ Driver/ Xdebug.php - Stop collection of code coverage information.
File
- vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage/ Driver/ Xdebug.php, line 62
Class
- PHP_CodeCoverage_Driver_Xdebug
- Driver for Xdebug's code coverage functionality.
Code
private function cleanup(array $data) {
foreach (array_keys($data) as $file) {
unset($data[$file][0]);
if ($file != 'xdebug://debug-eval' && file_exists($file)) {
$numLines = $this
->getNumberOfLinesInFile($file);
foreach (array_keys($data[$file]) as $line) {
if (isset($data[$file][$line]) && $line > $numLines) {
unset($data[$file][$line]);
}
}
}
}
return $data;
}