File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -86,14 +86,21 @@ public function setDetermineBranchCoverage(bool $flag): void
86
86
private function cleanup (array $ data ): array
87
87
{
88
88
foreach (\array_keys ($ data ) as $ file ) {
89
- unset($ data [$ file ][0 ]);
89
+ if (!isset ($ data [$ file ]['lines ' ])) {
90
+ $ data [$ file ] = ['lines ' => $ data [$ file ]];
91
+ }
92
+ if (!isset ($ data [$ file ]['functions ' ])) {
93
+ $ data [$ file ]['functions ' ] = [];
94
+ }
95
+
96
+ unset($ data [$ file ]['lines ' ][0 ]);
90
97
91
98
if (\strpos ($ file , 'xdebug://debug-eval ' ) !== 0 && \file_exists ($ file )) {
92
99
$ numLines = $ this ->getNumberOfLinesInFile ($ file );
93
100
94
- foreach (\array_keys ($ data [$ file ]) as $ line ) {
101
+ foreach (\array_keys ($ data [$ file ][ ' lines ' ] ) as $ line ) {
95
102
if ($ line > $ numLines ) {
96
- unset($ data [$ file ][$ line ]);
103
+ unset($ data [$ file ][' lines ' ][ $ line ]);
97
104
}
98
105
}
99
106
}
You can’t perform that action at this time.
0 commit comments