Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Commit 567fd54

Browse files
authored
Corrects signature of DDTrace\trace_method stub and adds DDTrace\trace_function (#6)
1 parent c2d5f04 commit 567fd54

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

stubs/functions.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,18 @@ function ddtrace_config_app_name(string $fallback): string
3030

3131
if (!function_exists('DDTrace\trace_method')) {
3232
/**
33-
* @phpstan-param \Closure(DDTrace\SpanData, list<mixed>=, mixed|null=, \Throwable|null=): void $tracingClosure
33+
* @phpstan-param \Closure|array $tracingClosure
3434
*/
35-
function trace_method(string $className, string $methodName, \Closure $tracingClosure): void
35+
function trace_method(string $className, string $methodName, $tracingClosure): void
36+
{
37+
}
38+
}
39+
40+
if (!function_exists('DDTrace\trace_function')) {
41+
/**
42+
* @phpstan-param \Closure|array $tracingClosure
43+
*/
44+
function trace_function(string $functionName, $tracingClosure): void
3645
{
3746
}
3847
}

0 commit comments

Comments
 (0)