Skip to content
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

Use phpstan return logic to infer return type from argument #419

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ildyria
Copy link
Contributor

@ildyria ildyria commented Apr 10, 2023

As migrating to php 8.2, I had to change utf8_encode (soon deprecated) to mb_convert_encoding.
Unfortunately this function when given a string as input returns a string, and when given an array returns an array.
This fix aims to leverage on phpdoc @return logic to infer the correct return type.

@ildyria
Copy link
Contributor Author

ildyria commented Apr 10, 2023

IDK why this is failing, I don't think the file I modified has impact on this. :|

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant