-
Notifications
You must be signed in to change notification settings - Fork 472
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
Improve count()
narrowing of constant arrays
#3709
base: 2.1.x
Are you sure you want to change the base?
Conversation
I know, I changed that narrow* method to return Type instead of SpecifiesTypes. Maybe I'll change this back again tomorrow. |
891412d
to
22ef97b
Compare
adapted. looks better now IMO. The master plan is to move more common things for both @staabm what do you think about this? |
this PR looks great, thanks for cleaning up after me :) |
5964211
to
75991d1
Compare
Should stuff like this be based on 1.12.x or latest dev branch? I sometimes have issues deciding 😅 |
Big changes to TypeSpecifier I prefer on 2.1.x, to avoid conflicts. |
a84121e
to
8092d6b
Compare
8092d6b
to
f340663
Compare
Thx, makes sense. And good call, there was a conflict.. Rebased this and also other of my PRs on 2.1.x and dealt with conflicts 😊 |
c8b87e5
to
c0e6269
Compare
fc54113
to
d92b6f0
Compare
Generalizes the already existing solution (wow, this is way more complicated than I thought!) and uses it outside of union types as well. I kind of had to make the "isNormalCount" determination a bit more dry, which unfortunately made the diff worse..
I did do a performance comparison with
hyperfine
runningmake phpstan
and didn't notice any changes, but my system is not the best.Closes phpstan/phpstan#12190
Closes phpstan/phpstan#3631