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

Breadcrumb

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

function ProcessedCodeCoverageData::initPreviouslyUnseenFunction

For a function we have never seen before, copy all data over and simply init the 'hit' array.

@psalm-param XdebugFunctionCoverageType $functionData

2 calls to ProcessedCodeCoverageData::initPreviouslyUnseenFunction()
ProcessedCodeCoverageData::initializeUnseenData in vendor/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php
ProcessedCodeCoverageData::merge in vendor/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php

File

vendor/phpunit/php-code-coverage/src/Data/ProcessedCodeCoverageData.php, line 242

Class

ProcessedCodeCoverageData
@internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage

Namespace

SebastianBergmann\CodeCoverage\Data

Code

private function initPreviouslyUnseenFunction(string $file, string $functionName, array $functionData) : void {
    $this->functionCoverage[$file][$functionName] = $functionData;
    foreach (array_keys($functionData['branches']) as $branchId) {
        $this->functionCoverage[$file][$functionName]['branches'][$branchId]['hit'] = [];
    }
    foreach (array_keys($functionData['paths']) as $pathId) {
        $this->functionCoverage[$file][$functionName]['paths'][$pathId]['hit'] = [];
    }
}
RSS feed
Powered by Drupal