@@ -126,10 +126,9 @@ class PHP_CodeCoverage
126
126
*
127
127
* @param PHP_CodeCoverage_Driver $driver
128
128
* @param PHP_CodeCoverage_Filter $filter
129
- * @param boolean $forceCoversAnnotation
130
129
* @throws InvalidArgumentException
131
130
*/
132
- public function __construct (PHP_CodeCoverage_Driver $ driver = NULL , PHP_CodeCoverage_Filter $ filter = NULL , $ forceCoversAnnotation = FALSE )
131
+ public function __construct (PHP_CodeCoverage_Driver $ driver = NULL , PHP_CodeCoverage_Filter $ filter = NULL )
133
132
{
134
133
if ($ driver === NULL ) {
135
134
$ driver = new PHP_CodeCoverage_Driver_Xdebug ;
@@ -139,13 +138,8 @@ public function __construct(PHP_CodeCoverage_Driver $driver = NULL, PHP_CodeCove
139
138
$ filter = PHP_CodeCoverage_Filter::getInstance ();
140
139
}
141
140
142
- if (!is_bool ($ forceCoversAnnotation )) {
143
- throw new InvalidArgumentException ;
144
- }
145
-
146
- $ this ->driver = $ driver ;
147
- $ this ->filter = $ filter ;
148
- $ this ->forceCoversAnnotation = $ forceCoversAnnotation ;
141
+ $ this ->driver = $ driver ;
142
+ $ this ->filter = $ filter ;
149
143
}
150
144
151
145
/**
@@ -389,6 +383,19 @@ public function filter()
389
383
return $ this ->filter ;
390
384
}
391
385
386
+ /**
387
+ * @param boolean $flag
388
+ * @throws InvalidArgumentException
389
+ */
390
+ public function setForceCoversAnnotation ($ flag )
391
+ {
392
+ if (!is_bool ($ flag )) {
393
+ throw new InvalidArgumentException ;
394
+ }
395
+
396
+ $ this ->forceCoversAnnotation = $ flag ;
397
+ }
398
+
392
399
/**
393
400
* @param boolean $flag
394
401
* @throws InvalidArgumentException
0 commit comments