Replies: 1 comment 6 replies
-
|
I'd look into ways how to make ClosureType from this Closure. This would allow you to ask anything about the object (parameters etc.). Either with a new PHPStan API we'd implement and that would do this for you, or maybe you could access the original AST where this closure is defined and you'd retrieve the ClosureType by yourself? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
While developing a
MethodsClassReflectionExtensionextension, I have a native PHP Closure and I need to extract information from this closure. Like return type, parameter types etc. But in PHPStan type system because it'll be used in a customMethodReflectionIs there a way to do this?
(I know maybe this sounds like a XY problem, but this is about Laravel macros. So currently getting access to the macro closure itself is the only solution.)
Beta Was this translation helpful? Give feedback.
All reactions