private function PHP_CodeCoverage::getAllowedLines in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/php-code-coverage/src/CodeCoverage.php \PHP_CodeCoverage::getAllowedLines()
@since Method available since Release 2.0.0
Parameters
array $linesToBeCovered:
array $linesToBeUsed:
Return value
array
1 call to PHP_CodeCoverage::getAllowedLines()
- PHP_CodeCoverage::performUnintentionallyCoveredCodeCheck in vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage.php - @since Method available since Release 2.0.0
File
- vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage.php, line 865
Class
- PHP_CodeCoverage
- Provides collection functionality for PHP code coverage information.
Code
private function getAllowedLines(array $linesToBeCovered, array $linesToBeUsed) {
$allowedLines = array();
foreach (array_keys($linesToBeCovered) as $file) {
if (!isset($allowedLines[$file])) {
$allowedLines[$file] = array();
}
$allowedLines[$file] = array_merge($allowedLines[$file], $linesToBeCovered[$file]);
}
foreach (array_keys($linesToBeUsed) as $file) {
if (!isset($allowedLines[$file])) {
$allowedLines[$file] = array();
}
$allowedLines[$file] = array_merge($allowedLines[$file], $linesToBeUsed[$file]);
}
foreach (array_keys($allowedLines) as $file) {
$allowedLines[$file] = array_flip(array_unique($allowedLines[$file]));
}
return $allowedLines;
}