Carry types into invoked callable/closure #7797
Unanswered
leongersen
asked this question in
Support
Replies: 1 comment 4 replies
-
|
I would have recommended to add phpdoc to your callable. Because phpstan won't infer it from the variable. That's normal cause you could want to call it with different params. But it doesn't work https://phpstan.org/r/96a10662-9dd9-432d-b816-9574cf6b50b7 psalm does https://psalm.dev/r/9f970bdc29 So it seems like a bug/feature request. |
Beta Was this translation helpful? Give feedback.
4 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.
-
I'm trying to analyse some generated code.
Is there a way to have PhpStan "carry" the known types into an (inline) function invocation?
https://phpstan.org/r/3b8fec48-5b00-4a34-9cde-65037a5c6398
Beta Was this translation helpful? Give feedback.
All reactions