You are here

public function PHP_CodeCoverage::stop in Zircon Profile 8.0

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

Stop collection of code coverage information.

Parameters

bool $append:

mixed $linesToBeCovered:

array $linesToBeUsed:

Return value

array

Throws

PHP_CodeCoverage_Exception

File

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

Class

PHP_CodeCoverage
Provides collection functionality for PHP code coverage information.

Code

public function stop($append = true, $linesToBeCovered = array(), array $linesToBeUsed = array()) {
  if (!is_bool($append)) {
    throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(1, 'boolean');
  }
  if (!is_array($linesToBeCovered) && $linesToBeCovered !== false) {
    throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(2, 'array or false');
  }
  $data = $this->driver
    ->stop();
  $this
    ->append($data, null, $append, $linesToBeCovered, $linesToBeUsed);
  $this->currentId = null;
  return $data;
}