Skip to content

Commit 6688646

Browse files
author
abluchet
committed
try
1 parent 1174026 commit 6688646

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Driver/PHPDBG.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ public function start($determineUnusedAndDead = true)
4747
phpdbg_start_oplog();
4848
}
4949

50+
private function getFiles() {
51+
return array_filter(get_included_files(), function ($value, $key) {
52+
return strpos(dirname($value), realpath(__DIR__.'/../../../../../src')) !== false;
53+
}, ARRAY_FILTER_USE_BOTH);
54+
}
55+
5056
/**
5157
* Stop collection of code coverage information.
5258
*
@@ -59,10 +65,10 @@ public function stop()
5965
$dbgData = phpdbg_end_oplog();
6066

6167
if ($fetchedLines == []) {
62-
$sourceLines = phpdbg_get_executable();
68+
$sourceLines = phpdbg_get_executable(['files' => $this->getFiles()]);
6369
} else {
6470
$newFiles = array_diff(
65-
get_included_files(),
71+
$this->getFiles(),
6672
array_keys($fetchedLines)
6773
);
6874

0 commit comments

Comments
 (0)