function CodeCoverage::stop
Same name in this branch
- 11.1.x vendor/phpunit/php-code-coverage/src/CodeCoverage.php \SebastianBergmann\CodeCoverage\CodeCoverage::stop()
File
-
vendor/
phpunit/ phpunit/ src/ Runner/ CodeCoverage.php, line 174
Class
- CodeCoverage
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\RunnerCode
public function stop(bool $append = true, array|false $linesToBeCovered = [], array $linesToBeUsed = []) : void {
if (!$this->collecting) {
return;
}
$status = TestStatus::unknown();
if ($this->test !== null) {
if ($this->test
->status()
->isSuccess()) {
$status = TestStatus::success();
}
else {
$status = TestStatus::failure();
}
}
/* @noinspection UnusedFunctionResultInspection */
$this->codeCoverage
->stop($append, $status, $linesToBeCovered, $linesToBeUsed, $this->linesToBeIgnored);
$this->test = null;
$this->collecting = false;
}