We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 508f1d1 commit b430851Copy full SHA for b430851
src/CodeCoverage/Driver/Xdebug.php
@@ -22,6 +22,11 @@
22
*/
23
class PHP_CodeCoverage_Driver_Xdebug implements PHP_CodeCoverage_Driver
24
{
25
+ /**
26
+ * @var integer
27
+ */
28
+ private $flags;
29
+
30
/**
31
* Constructor.
32
@@ -37,14 +42,20 @@ public function __construct()
37
42
'xdebug.coverage_enable=On has to be set in php.ini'
38
43
);
39
44
}
45
46
+ $this->flags = XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE;
47
48
+ if (defined('XDEBUG_CC_BRANCH_CHECK')) {
49
+ $this->flags |= XDEBUG_CC_BRANCH_CHECK;
50
+ }
40
51
41
52
53
54
* Start collection of code coverage information.
55
56
public function start()
57
- xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);
58
+ xdebug_start_code_coverage($this->flags);
59
60
61
0 commit comments