Add ArrayChangeKeyCaseFunctionReturnTypeExtension
Closes https://github.com/phpstan/phpstan/issues/11795 Closes https://github.com/phpstan/phpstan/issues/10960
cc @staabm
This pull request has been marked as ready for review.
I updated the PR to also support uppercase-string @ondrejmirtes
Thank you.
Would be nice to add a similar extension for mb_convert_case, would you look into it? Context: https://github.com/phpstan/phpstan/discussions/12452
Thanks!
Would be nice to add a similar extension for
mb_convert_case, would you look into it? Context: phpstan/phpstan#12452Thanks!
Do you have a reproducer ?
Because, for me, the mb_convert_case extension is handled by https://github.com/phpstan/phpstan-src/blob/e2b5a60fa52460ba3addd519b07e2244809878ee/src/Type/Php/StrCaseFunctionsReturnTypeExtension.php#L45
And we can see in the history that it was handled for lowercase-string and upper-case string https://github.com/phpstan/phpstan-src/commits/e2b5a60fa52460ba3addd519b07e2244809878ee/src/Type/Php/StrCaseFunctionsReturnTypeExtension.php
I'm sorry, I haven't checked personally and trusted the user. PHPStan already handles it well https://phpstan.org/r/fad685d0-5331-4af2-8bb9-d0d1a0f81d00.
Yes, it works fine https://phpstan.org/r/b269ff18-e0b8-42d4-9586-87edaee9fccf