You are here

public function PHP_CodeCoverage::start in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/php-code-coverage/src/CodeCoverage.php \PHP_CodeCoverage::start()

Start collection of code coverage information.

Parameters

mixed $id:

bool $clear:

Throws

PHP_CodeCoverage_Exception

File

vendor/phpunit/php-code-coverage/src/CodeCoverage.php, line 207

Class

PHP_CodeCoverage
Provides collection functionality for PHP code coverage information.

Code

public function start($id, $clear = false) {
  if (!is_bool($clear)) {
    throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(1, 'boolean');
  }
  if ($clear) {
    $this
      ->clear();
  }
  $this->currentId = $id;
  $this->driver
    ->start();
}