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
Avoiding double spaces (v2) #7837
Conversation
There doesn't seem to be a great place for it, I would probably just stick it in PropertyTypeTest.php since there are other tests for that issue in there, but if you see a better place for it that's fine too (test organization isn't the best, but it's also not terrible and it doesn't affect much so it hasn't been a priority). Most tests just check the issue type, but there are some like here that also check the location and message ( I almost wouldn't bother asking for a test for a change like this, but since there's no linked issue and it's not immediately obvious to me in what case There's also still a CS failure, that phpcs isn't able to auto-fix. Sorry to make this so difficult! |
In my case, $foo->getBar()->whatever So before taking a look at the tests: If the purpose is just to inform contributors, what about adding a comment in the code instead? |
I'll defer to @orklah on that since he's the maintainer, but we do tend to be less strict about testing issue messages, so filing an issue with a reproducer and linking it to the PR is probably fine in this case if it's less trouble (I guess I just think of adding a test as easier, but maybe that's because I'm more familiar with it). |
I'm fine without tests on that one. Note: double spaces happen when Psalm can't display the variable identifier. It happens for some convoluted expressions (like $foo->getBar()->whatever in this case). However, it's not just about display, it has an effect on assertions and probably other things so it's not easy to fix. Can you just fix the CS issue please? :) |
There you go :-) |
Thanks! |
Second attempt of #7835
@AndrolGenhald Is there a test I can use as template? Can't find anything for
InstancePropertyFetchAnalyzer.php
...