You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I would like to enable for Closures the two rules already present for normal functions, MissingFunctionParameterTypehintRule and MissingFunctionReturnTypehintRule.
I found that master branch has this commit 491540d which already enabled PHPStan\Rules\Missing\MissingClosureNativeReturnTypehintRule, so I guess only the parameter typehint is still missing.
May I propose a PR for a MissingClosureParameterTypehintRule?
The text was updated successfully, but these errors were encountered:
Hi, the main blocker is that PHPStan currently does not read docblocks for
closures. So things like union types or what’s in an array cannot be
expressed for closures. We’d need to do that first and then adding such a
rule would be easy.
MissingClosureNativeReturnTypehintRule
is a little bit different. It looks at what you’re returning from the
function, and if it can be expressed with a native typehint, it asks you to
do so.
On Thu, 22 Aug 2019 at 14:27, Filippo Tessarotto ***@***.***> wrote:
Hi, I would like to enable for Closures the two rules already present for
normal functions, MissingFunctionParameterTypehintRule and
MissingFunctionReturnTypehintRule.
I found that master branch has this commit 491540d
<491540d>
which already enabled
PHPStan\Rules\Missing\MissingClosureNativeReturnTypehintRule, so I guess
only the parameter typehint is still missing.
May I propose a PR for a MissingClosureParameterTypehintRule?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#87?email_source=notifications&email_token=AAAZTOCUBETEUI6ULR7AO6TQF2A2DA5CNFSM4IOUMVPKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HGYWNSQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAZTOC4F5PLHXZUK4LLXVLQF2A2DANCNFSM4IOUMVPA>
.
Hi, I would like to enable for Closures the two rules already present for normal functions,
MissingFunctionParameterTypehintRule
andMissingFunctionReturnTypehintRule
.I found that master branch has this commit 491540d which already enabled
PHPStan\Rules\Missing\MissingClosureNativeReturnTypehintRule
, so I guess only the parameter typehint is still missing.May I propose a PR for a
MissingClosureParameterTypehintRule
?The text was updated successfully, but these errors were encountered: