-
Notifications
You must be signed in to change notification settings - Fork 504
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
Support returning an array or a string in count_chars()
#3596
Conversation
u01jmg3
commented
Nov 1, 2024
•
edited
Loading
edited
- https://www.php.net/manual/en/function.count-chars.php
This comment was marked as resolved.
This comment was marked as resolved.
for a php version dependent return-type a we have a few of them in the codebase already for inspiration. |
Yikes - as this codebase is so new to me, I'm struggling to know where to start. It looks like this is the first time a string function has made use of the
|
see e.g. https://github.com/phpstan/phpstan-src/blob/2.0.x/src/Type/Php/AbsFunctionDynamicReturnTypeExtension.php which is similar to what we need.
PHPStan 2.x will have min php version of 7.4.
the test-cases are still useful |
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.
this looks pretty good already
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.
Congratulations. You successfully build your first PHPStan extension :-)
@staabm: thanks for your patience/guidance 🙏🏻 |
Thank you. |