function CodeCoverage::getAllowedLines
1 call to CodeCoverage::getAllowedLines()
- CodeCoverage::performUnintentionallyCoveredCodeCheck in vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage.php
File
-
vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage.php, line 527
Class
- CodeCoverage
- Provides collection functionality for PHP code coverage information.
Namespace
SebastianBergmann\CodeCoverageCode
private function getAllowedLines(array $linesToBeCovered, array $linesToBeUsed) : array {
$allowedLines = [];
foreach (array_keys($linesToBeCovered) as $file) {
if (!isset($allowedLines[$file])) {
$allowedLines[$file] = [];
}
$allowedLines[$file] = array_merge($allowedLines[$file], $linesToBeCovered[$file]);
}
foreach (array_keys($linesToBeUsed) as $file) {
if (!isset($allowedLines[$file])) {
$allowedLines[$file] = [];
}
$allowedLines[$file] = array_merge($allowedLines[$file], $linesToBeUsed[$file]);
}
foreach (array_keys($allowedLines) as $file) {
$allowedLines[$file] = array_flip(array_unique($allowedLines[$file]));
}
return $allowedLines;
}