添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
灰常酷的鸡蛋  ·  友盟+首席产品官 ...·  2 月前    · 
暴走的火锅  ·  Spark or PySpark ...·  4 月前    · 
干练的围巾  ·  make oldconfig: ...·  10 月前    · 

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