Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CodeCoverage.php

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\CodeCoverage

Code

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;
}
RSS feed
Powered by Drupal