You are here

private function PHP_CodeCoverage::selectDriver in Zircon Profile 8

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

Return value

PHP_CodeCoverage_Driver

Throws

PHP_CodeCoverage_Exception

1 call to PHP_CodeCoverage::selectDriver()
PHP_CodeCoverage::__construct in vendor/phpunit/php-code-coverage/src/CodeCoverage.php
Constructor.

File

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

Class

PHP_CodeCoverage
Provides collection functionality for PHP code coverage information.

Code

private function selectDriver() {
  $runtime = new Runtime();
  if (!$runtime
    ->canCollectCodeCoverage()) {
    throw new PHP_CodeCoverage_Exception('No code coverage driver available');
  }
  if ($runtime
    ->isHHVM()) {
    return new PHP_CodeCoverage_Driver_HHVM();
  }
  elseif ($runtime
    ->isPHPDBG()) {
    return new PHP_CodeCoverage_Driver_PHPDBG();
  }
  else {
    return new PHP_CodeCoverage_Driver_Xdebug();
  }
}