phpstan-src icon indicating copy to clipboard operation
phpstan-src copied to clipboard

Add `@no-named-arguments` check to MethodSignatureRule

Open jrmajor opened this issue 3 years ago • 5 comments

Add a check preventing a child method from declaring @no-named-arguments when the parent method does not.

jrmajor avatar Jun 06 '22 10:06 jrmajor

FYI @jrmajor I've also seen @no-named-arguments declared not just above a method, but also above a class.

ondrejmirtes avatar Jun 07 '22 08:06 ondrejmirtes

@ondrejmirtes I've seen that in PHPUnit too, but last time I've checked Psalm didn't support that, so I've decided to get it working with methods first :)

BTW, I would appreciate you pointing me in the right direction with that PR...

jrmajor avatar Jun 07 '22 09:06 jrmajor

I'll rebase and adjust this PR once I merge https://github.com/phpstan/phpstan-src/pull/1403.

ondrejmirtes avatar Jun 07 '22 11:06 ondrejmirtes

Alright, did some modifications: https://github.com/phpstan/phpstan-src/pull/1400/commits/7bb0fc12e617c2fd71ce97eb9dd4541fd9972456

Can you please finish the PR so that the build is green? Thanks :)

ondrejmirtes avatar Jun 07 '22 12:06 ondrejmirtes

@ondrejmirtes I'm sorry, I don't know why these tests are failing (these aren't new ones, I've added them in the previous PR, in 598bda2b7a589f9bf59137b0c05179a28bddc1c5).

jrmajor avatar Jul 01 '22 11:07 jrmajor

Hi, I'm cleaning up old and stale PRs. Please send a new PR if you're still interested, thanks.

ondrejmirtes avatar Oct 16 '22 10:10 ondrejmirtes