File tree Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -50,4 +50,9 @@ public function stop(): array;
50
50
* Returns true if whitelist filtering is supported.
51
51
*/
52
52
public function supportsWhitelistFiltering(): bool;
53
+
54
+ /**
55
+ * Sets the whitelist.
56
+ */
57
+ public function setWhitelistedFiles(array $whitelistedFiles): void;
53
58
}
Original file line number Diff line number Diff line change @@ -82,6 +82,14 @@ public function supportsWhitelistFiltering(): bool
82
82
return false;
83
83
}
84
84
85
+ /**
86
+ * @throws RuntimeException
87
+ */
88
+ public function setWhitelistedFiles(array $whitelistedFiles): void
89
+ {
90
+ throw new RuntimeException('PHPDBG does not support whitelist filtering');
91
+ }
92
+
85
93
/**
86
94
* Convert phpdbg based data into the format CodeCoverage expects
87
95
*/
Original file line number Diff line number Diff line change @@ -74,11 +74,11 @@ public function supportsWhitelistFiltering(): bool
74
74
return $this->hasSupportForWhitelistFiltering;
75
75
}
76
76
77
- /**
78
- * @param array $data
79
- *
80
- * @return array
81
- */
77
+ public function setWhitelistedFiles(array $whitelistedFiles): void
78
+ {
79
+ \xdebug_set_filter(XDEBUG_FILTER_CODE_COVERAGE, XDEBUG_PATH_WHITELIST, $whitelistedFiles);
80
+ }
81
+
82
82
private function cleanup(array $data): array
83
83
{
84
84
foreach (\array_keys($data) as $file) {
You can’t perform that action at this time.
0 commit comments