protected function PHP_CodeCoverage::addUncoveredFilesFromWhitelist

Processes whitelisted files that are not covered.

1 call to PHP_CodeCoverage::addUncoveredFilesFromWhitelist()
PHP_CodeCoverage::getData in drupal/core/vendor/phpunit/php-code-coverage/PHP/CodeCoverage.php
Returns the collected code coverage data.

File

drupal/core/vendor/phpunit/php-code-coverage/PHP/CodeCoverage.php, line 520

Class

PHP_CodeCoverage
Provides collection functionality for PHP code coverage information.

Code

protected 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] = -1;
      }
    }
  }
  $this
    ->append($data, 'UNCOVERED_FILES_FROM_WHITELIST');
}