diff --git a/src/Async/CallableDescriptor.php b/src/Async/CallableDescriptor.php index 018473d..a048fb1 100644 --- a/src/Async/CallableDescriptor.php +++ b/src/Async/CallableDescriptor.php @@ -152,7 +152,7 @@ private function describeClosure(\Closure $closure): string return match (true) { $object !== null => $this->describeMethod($object, $reflection->getName()), - $scope !== null => $this->describeMethod($scope->getName(), $reflection->getName()), + $scope instanceof \ReflectionClass => $this->describeMethod($scope->getName(), $reflection->getName()), default => $this->describeString($reflection->getName()), }; }