添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
寂寞的茶叶  ·  ios iframe ...·  3 周前    · 
爱吹牛的棒棒糖  ·  【同舟共济 ...·  3 月前    · 
面冷心慈的帽子  ·  Amazon.com·  4 月前    · 
捣蛋的凉茶  ·  20 多个 JavaScript ...·  4 月前    · 

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 ?

Ok then, I'll wait for a PR.

For those who don't want to wait, don't use docblocks for closures and don't handle mixed types, a simple rule like this can be added to the project:

https://github.com/Slamdunk/phpstan-extensions/blob/v3.6.0/lib/MissingClosureParameterTypehintRule.php