Skip to content

Commit

Permalink
What does getShortName return?
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Apr 18, 2024
1 parent ff63f10 commit 1c1fad0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ function weakClosure(\Closure $closure): \Closure
$useBindTo = !$scope || $that::class !== $scope->name || $scope->isInternal();

$methodName = $reflection->getShortName();
var_dump($methodName);
if (!\str_starts_with($methodName, '{closure')) {
// Closure from first-class callable or \Closure::fromCallable(), declare an anonymous closure to rebind.
/** @psalm-suppress InvalidScope Closure is bound before being invoked. */
Expand Down

0 comments on commit 1c1fad0

Please sign in to comment.