We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37964b9 commit 577fdf3Copy full SHA for 577fdf3
PHP/CodeCoverage/Driver/Xdebug.php
@@ -88,9 +88,25 @@ public function start()
88
*/
89
public function stop()
90
{
91
- $codeCoverage = xdebug_get_code_coverage();
+ $data = xdebug_get_code_coverage();
92
xdebug_stop_code_coverage();
93
94
- return $codeCoverage;
+ return $this->cleanup($data);
95
+ }
96
+
97
+ /**
98
+ * @param array $data
99
+ * @return array
100
+ * @since Method available since Release 1.3.0
101
+ */
102
+ private function cleanup(array $data)
103
+ {
104
+ foreach (array_keys($data) as $file) {
105
+ if (isset($data[$file][0])) {
106
+ unset($data[$file][0]);
107
108
109
110
+ return $data;
111
}
112
0 commit comments