3
* This file is part of the PHP_CodeCoverage package.
5
* (c) Sebastian Bergmann <sebastian@phpunit.de>
7
* For the full copyright and license information, please view the LICENSE
8
* file that was distributed with this source code.
12
* Driver for HHVM's code coverage functionality.
15
* @package CodeCoverage
16
* @author Sebastian Bergmann <sebastian@phpunit.de>
17
* @copyright Sebastian Bergmann <sebastian@phpunit.de>
18
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
19
* @link http://github.com/sebastianbergmann/php-code-coverage
20
* @since Class available since Release 1.3.0
23
class PHP_CodeCoverage_Driver_HHVM implements PHP_CodeCoverage_Driver
28
public function __construct()
30
if (!defined('HHVM_VERSION')) {
31
throw new PHP_CodeCoverage_Exception('This driver requires HHVM');
36
* Start collection of code coverage information.
38
public function start()
40
fb_enable_code_coverage();
44
* Stop collection of code coverage information.
48
public function stop()
50
$codeCoverage = fb_get_code_coverage(true);
52
fb_disable_code_coverage();