File tree Expand file tree Collapse file tree 4 files changed +8
-24
lines changed Expand file tree Collapse file tree 4 files changed +8
-24
lines changed Original file line number Diff line number Diff line change @@ -38,10 +38,8 @@ interface Driver
38
38
39
39
/**
40
40
* Start collection of code coverage information.
41
- *
42
- * @param bool $determineUnusedAndDead
43
41
*/
44
- public function start ($ determineUnusedAndDead = true );
42
+ public function start ();
45
43
46
44
/**
47
45
* Stop collection of code coverage information.
Original file line number Diff line number Diff line change @@ -19,10 +19,8 @@ class HHVM extends Xdebug
19
19
{
20
20
/**
21
21
* Start collection of code coverage information.
22
- *
23
- * @param bool $determineUnusedAndDead
24
22
*/
25
- public function start ($ determineUnusedAndDead = true )
23
+ public function start ()
26
24
{
27
25
xdebug_start_code_coverage ();
28
26
}
Original file line number Diff line number Diff line change @@ -39,10 +39,8 @@ public function __construct()
39
39
40
40
/**
41
41
* Start collection of code coverage information.
42
- *
43
- * @param bool $determineUnusedAndDead
44
42
*/
45
- public function start ($ determineUnusedAndDead = true )
43
+ public function start ()
46
44
{
47
45
phpdbg_start_oplog ();
48
46
}
Original file line number Diff line number Diff line change @@ -27,35 +27,25 @@ class Xdebug implements Driver
27
27
private $ cacheNumLines = [];
28
28
29
29
/**
30
- * Constructor.
30
+ * @throws RuntimeException
31
31
*/
32
32
public function __construct ()
33
33
{
34
34
if (!extension_loaded ('xdebug ' )) {
35
35
throw new RuntimeException ('This driver requires Xdebug ' );
36
36
}
37
37
38
- if (version_compare (phpversion ('xdebug ' ), '2.2.1 ' , '>= ' ) &&
39
- !ini_get ('xdebug.coverage_enable ' )) {
40
- throw new RuntimeException (
41
- 'xdebug.coverage_enable=On has to be set in php.ini '
42
- );
38
+ if (version_compare (phpversion ('xdebug ' ), '2.2.1 ' , '>= ' ) && !ini_get ('xdebug.coverage_enable ' )) {
39
+ throw new RuntimeException ('xdebug.coverage_enable=On has to be set in php.ini ' );
43
40
}
44
41
}
45
42
46
43
/**
47
44
* Start collection of code coverage information.
48
- *
49
- * @param bool $determineUnusedAndDead
50
45
*/
51
- public function start ($ determineUnusedAndDead = true )
46
+ public function start ()
52
47
{
53
- $ options = 0 ;
54
-
55
- if ($ determineUnusedAndDead ) {
56
- $ options |= XDEBUG_CC_UNUSED ;
57
- $ options |= XDEBUG_CC_DEAD_CODE ;
58
- }
48
+ $ options = XDEBUG_CC_DEAD_CODE | XDEBUG_CC_UNUSED ;
59
49
60
50
xdebug_start_code_coverage ($ options );
61
51
}
You can’t perform that action at this time.
0 commit comments