-
Notifications
You must be signed in to change notification settings - Fork 545
get_defined_vars() return type contains know variables #3624
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
get_defined_vars() return type contains know variables #3624
Conversation
0bd65db to
5eea5cb
Compare
5eea5cb to
8b88081
Compare
8b88081 to
e9ee834
Compare
e9ee834 to
4b62aaa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When escaping single quotes, I always (when possible) switch to double quoted string to prevent that.
- easier on the eyes
- easier to copy and paste
- easier to search for the unescaped string in the codebase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do that too but I checked how it is done in other parts of PHPStan and found out that escaping seems to be standard here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also often do the double quote. but I think in general it's very inconsistent :D not sure if such thing exists, but a coding standard rule might be good for this 😊
UPDATE: on the other hand - in those tests files it wouldn't be enforced anyway I guess..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(the unrelated lint build errors will be fixed after rebase; please remove the merge commit)
6eed675 to
1f7ebbe
Compare
@staabm Removed merge commit. Should be ready to merge - two failing checks are unrelated.
the "Lint / Coding Standard (pull_request) " fail is related to the PR. just run make cs-fix locally and commit the fix
1f7ebbe to
ddba1cd
Compare
CS fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also it might be useful to still do it on 1.12.x instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use ConstantArrayTypeBuilder instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rewritten
Also it might be useful to still do it on 1.12.x instead?
How to do it properly? Can I just change target branch?
ddba1cd to
2110e67
Compare
How to do it properly? Can I just change target branch?
try locally running a rebase against 1.12.x. if it works cleanly just force push it and change the target branch of the PR
(make sure your 1.12.x local branch is up 2 date before)
2110e67 to
7a7c05c
Compare
Co-Authored-By: Ruud Kamphuis <ruudk@users.noreply.github.com>
7a7c05c to
a503e9b
Compare
Well for some reason (maby I messed up) I was a bit more complicated but it seems it is ok now. I will see if check find any issue and fix it eventualy.
Ok it should be ready for merge into 1.12.x
Perfect, thank you!
Uh oh!
There was an error while loading. Please reload this page.
Solves phpstan/phpstan#11948
Solves phpstan/phpstan#11740
Credits to @ruudk