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 don't know if it's intentional and I know that this situation never should happen in first place, however...
Interface in framework has defined invalid return type. I wanted to override it in my implementation and ignore errors from PHPStan with inline comment, but for me it is not working. I don't want to ignore this error globally, because most of the time this error is fine and should be fixed.
Hi, technically this should be ignorable so it's a valid bug, but there's a much better approach to your problem. What's bad about your approach is that when you typehint TestInterface somewhere, PHPStan will still think that TestInterface::set() returns an array. The correct way to approach this is with stub files: just create a stub file that looks like this and register it in your phpstan.neon:
Bug report
Hi. I don't know if it's intentional and I know that this situation never should happen in first place, however...
Interface in framework has defined invalid return type. I wanted to override it in my implementation and ignore errors from PHPStan with inline comment, but for me it is not working. I don't want to ignore this error globally, because most of the time this error is fine and should be fixed.
Code snippet that reproduces the problem
https://phpstan.org/r/b99b9305-2db9-4ec5-a2cc-9c8c2ddaa9f0
Expected output
Ignored error.
The text was updated successfully, but these errors were encountered: