private function PHP_CodeCoverage::addUncoveredFilesFromWhitelist in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/php-code-coverage/src/CodeCoverage.php \PHP_CodeCoverage::addUncoveredFilesFromWhitelist()
Processes whitelisted files that are not covered.
1 call to PHP_CodeCoverage::addUncoveredFilesFromWhitelist()
- PHP_CodeCoverage::getData in vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage.php - Returns the collected code coverage data. Set $raw = true to bypass all filters.
File
- vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage.php, line 592
Class
- PHP_CodeCoverage
- Provides collection functionality for PHP code coverage information.
Code
private function addUncoveredFilesFromWhitelist() {
$data = array();
$uncoveredFiles = array_diff($this->filter
->getWhitelist(), array_keys($this->data));
foreach ($uncoveredFiles as $uncoveredFile) {
if (!file_exists($uncoveredFile)) {
continue;
}
if ($this->processUncoveredFilesFromWhitelist) {
$this
->processUncoveredFileFromWhitelist($uncoveredFile, $data, $uncoveredFiles);
}
else {
$data[$uncoveredFile] = array();
$lines = count(file($uncoveredFile));
for ($i = 1; $i <= $lines; $i++) {
$data[$uncoveredFile][$i] = PHP_CodeCoverage_Driver::LINE_NOT_EXECUTED;
}
}
}
$this
->append($data, 'UNCOVERED_FILES_FROM_WHITELIST');
}