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;
5050 * Returns true if whitelist filtering is supported.
5151 */
5252 public function supportsWhitelistFiltering (): bool ;
53+
54+ /**
55+ * Sets the whitelist.
56+ */
57+ public function setWhitelistedFiles (array $ whitelistedFiles ): void ;
5358}
Original file line number Diff line number Diff line change @@ -82,6 +82,14 @@ public function supportsWhitelistFiltering(): bool
8282 return false ;
8383 }
8484
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+
8593 /**
8694 * Convert phpdbg based data into the format CodeCoverage expects
8795 */
Original file line number Diff line number Diff line change @@ -74,11 +74,11 @@ public function supportsWhitelistFiltering(): bool
7474 return $ this ->hasSupportForWhitelistFiltering ;
7575 }
7676
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+
8282 private function cleanup (array $ data ): array
8383 {
8484 foreach (\array_keys ($ data ) as $ file ) {
You can’t perform that action at this time.
0 commit comments