-
Notifications
You must be signed in to change notification settings - Fork 54
Ignore error from strict method signature rule #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
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
Ignore error from strict method signature rule #56
Conversation
I'm too eager at merging today :D
@ondrejmirtes Good for me 😆 I'll create another pull request for phpstan to remove the parameter and ignore any remaining errors.
So, apparently there's one more bug when resolving phpDocs from a method in a nested trait. I'll take a look at that tomorrow.
BTW: 90% real-world problems at my job's codebase the rule found (with reportMaybes false) is about overriding parent return type void with something specific. I think we could relax this a bit, because I think it doesn't break LSP - when the parent interface is typehinted, the user code doesn't read the result, so it isn't bothered when a child implementation returns something there...
@ondrejmirtes True. I can adjust that tomorrow.
One more thing I'm realizing - the rule should probably be switched off for static methods. Yes, it can be invoked like $foo::doSomething() and LSP applies there, but that's pretty uncommon.
I did the proposed changes on phpstan/phpstan master, please check them out :)
Nice, thank you 🙂
No description provided.