File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -45,14 +45,19 @@ public function stop(): RawCodeCoverageData
4545 {
4646 \pcov \stop ();
4747
48- $ collect = \pcov \collect (
49- \pcov \inclusive,
50- !$ this ->filter ->isEmpty () ? $ this ->filter ->files () : \pcov \waiting ()
51- );
48+ $ filesToCollectCoverageFor = \pcov \waiting ();
49+ $ collected = [];
5250
53- \pcov \clear ();
51+ if ($ filesToCollectCoverageFor ) {
52+ if (!$ this ->filter ->isEmpty ()) {
53+ $ filesToCollectCoverageFor = array_intersect ($ filesToCollectCoverageFor , $ this ->filter ->files ());
54+ }
55+ $ collected = \pcov \collect (\pcov \inclusive, $ filesToCollectCoverageFor );
5456
55- return RawCodeCoverageData::fromXdebugWithoutPathCoverage ($ collect );
57+ \pcov \clear ();
58+ }
59+
60+ return RawCodeCoverageData::fromXdebugWithoutPathCoverage ($ collected );
5661 }
5762
5863 public function nameAndVersion (): string
You can’t perform that action at this time.
0 commit comments