@@ -47,21 +47,15 @@ final class CodeCoverage
4747
4848 private Filter $ filter ;
4949
50- /**
51- * @var Wizard
52- */
53- private $ wizard ;
50+ private Wizard $ wizard ;
5451
5552 private bool $ checkForUnintentionallyCoveredCode = false ;
5653
5754 private bool $ includeUncoveredFiles = true ;
5855
5956 private bool $ ignoreDeprecatedCode = false ;
6057
61- /**
62- * @var PhptTestCase|string|TestCase
63- */
64- private $ currentId ;
58+ private PhptTestCase |string |TestCase |null $ currentId ;
6559
6660 private ProcessedCodeCoverageData $ data ;
6761
@@ -150,12 +144,7 @@ public function setTests(array $tests): void
150144 $ this ->tests = $ tests ;
151145 }
152146
153- /**
154- * Start collection of code coverage information.
155- *
156- * @param PhptTestCase|string|TestCase $id
157- */
158- public function start ($ id , bool $ clear = false ): void
147+ public function start (PhptTestCase |string |TestCase $ id , bool $ clear = false ): void
159148 {
160149 if ($ clear ) {
161150 $ this ->clear ();
@@ -166,12 +155,7 @@ public function start($id, bool $clear = false): void
166155 $ this ->driver ->start ();
167156 }
168157
169- /**
170- * Stop collection of code coverage information.
171- *
172- * @param array|false $linesToBeCovered
173- */
174- public function stop (bool $ append = true , $ linesToBeCovered = [], array $ linesToBeUsed = []): RawCodeCoverageData
158+ public function stop (bool $ append = true , array |false $ linesToBeCovered = [], array $ linesToBeUsed = []): RawCodeCoverageData
175159 {
176160 if (!is_array ($ linesToBeCovered ) && $ linesToBeCovered !== false ) {
177161 throw new InvalidArgumentException (
@@ -188,16 +172,11 @@ public function stop(bool $append = true, $linesToBeCovered = [], array $linesTo
188172 }
189173
190174 /**
191- * Appends code coverage data.
192- *
193- * @param PhptTestCase|string|TestCase $id
194- * @param array|false $linesToBeCovered
195- *
196175 * @throws ReflectionException
197176 * @throws TestIdMissingException
198177 * @throws UnintentionallyCoveredCodeException
199178 */
200- public function append (RawCodeCoverageData $ rawData , $ id = null , bool $ append = true , $ linesToBeCovered = [], array $ linesToBeUsed = []): void
179+ public function append (RawCodeCoverageData $ rawData , PhptTestCase | string | TestCase | null $ id = null , bool $ append = true , array | false $ linesToBeCovered = [], array $ linesToBeUsed = []): void
201180 {
202181 if ($ id === null ) {
203182 $ id = $ this ->currentId ;
@@ -367,14 +346,10 @@ public function detectsDeadCode(): bool
367346 }
368347
369348 /**
370- * Applies the @covers annotation filtering.
371- *
372- * @param array|false $linesToBeCovered
373- *
374349 * @throws ReflectionException
375350 * @throws UnintentionallyCoveredCodeException
376351 */
377- private function applyCoversAnnotationFilter (RawCodeCoverageData $ rawData , $ linesToBeCovered , array $ linesToBeUsed ): void
352+ private function applyCoversAnnotationFilter (RawCodeCoverageData $ rawData , array | false $ linesToBeCovered , array $ linesToBeUsed ): void
378353 {
379354 if ($ linesToBeCovered === false ) {
380355 $ rawData ->clear ();
0 commit comments