function CodeCoverage::append
@psalm-param array<string,list<int>> $linesToBeIgnored
Throws
UnintentionallyCoveredCodeException
2 calls to CodeCoverage::append()
- CodeCoverage::addUncoveredFilesFromFilter in vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage.php - CodeCoverage::stop in vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage.php - @psalm-param array<string,list<int>> $linesToBeIgnored
File
-
vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage.php, line 205
Class
- CodeCoverage
- Provides collection functionality for PHP code coverage information.
Namespace
SebastianBergmann\CodeCoverageCode
public function append(RawCodeCoverageData $rawData, ?string $id = null, bool $append = true, ?TestStatus $status = null, array|false $linesToBeCovered = [], array $linesToBeUsed = [], array $linesToBeIgnored = []) : void {
if ($id === null) {
$id = $this->currentId;
}
if ($id === null) {
throw new TestIdMissingException();
}
$this->cachedReport = null;
if ($status === null) {
$status = TestStatus::unknown();
}
$size = $this->currentSize;
if ($size === null) {
$size = TestSize::unknown();
}
$this->applyFilter($rawData);
$this->applyExecutableLinesFilter($rawData);
if ($this->useAnnotationsForIgnoringCode) {
$this->applyIgnoredLinesFilter($rawData, $linesToBeIgnored);
}
$this->data
->initializeUnseenData($rawData);
if (!$append) {
return;
}
if ($id === self::UNCOVERED_FILES) {
return;
}
$this->applyCoversAndUsesFilter($rawData, $linesToBeCovered, $linesToBeUsed, $size);
if (empty($rawData->lineCoverage())) {
return;
}
$this->tests[$id] = [
'size' => $size->asString(),
'status' => $status->asString(),
];
$this->data
->markCodeAsExecutedByTestCase($id, $rawData);
}