Skip to content

Commit 5a1705e

Browse files
staabmsebastianbergmann
authored andcommitted
Don't calculate unnecessary information in debug_backtrace()
1 parent 29a81e4 commit 5a1705e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Event/Value/Test/TestMethodBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static function fromTestCase(TestCase $testCase): TestMethod
5454
*/
5555
public static function fromCallStack(): TestMethod
5656
{
57-
foreach (debug_backtrace() as $frame) {
57+
foreach (debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) {
5858
if (isset($frame['object']) && $frame['object'] instanceof TestCase) {
5959
return $frame['object']->valueObjectForEvents();
6060
}

0 commit comments

Comments
 (0)