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

mysqli_stmt_param_count() returns a non-negative int #692

Merged
merged 1 commit into from Oct 5, 2021
Merged

mysqli_stmt_param_count() returns a non-negative int #692

merged 1 commit into from Oct 5, 2021

Conversation

morozov
Copy link
Contributor

@morozov morozov commented Sep 29, 2021

@morozov
Copy link
Contributor Author

morozov commented Sep 29, 2021

Not sure if this patch is sufficient to address the mysqli_stmt::$param_count case as well. Should I duplicate the method definition?

@ondrejmirtes ondrejmirtes merged commit 1a34d80 into phpstan:master Oct 5, 2021
@ondrejmirtes
Copy link
Member

Thank you!

@ondrejmirtes
Copy link
Member

About the param_count property - you need to write a stub file about that. When in doubt, you can test it with \PHPStan\dumpType(). See: https://phpstan.org/user-guide/troubleshooting-types

@morozov morozov deleted the mysqli-stmt-param-count branch October 5, 2021 15:01
@morozov
Copy link
Contributor Author

morozov commented Oct 5, 2021

Thanks for the link on troubleshooting!

[…] you need to write a stub file about that.

Are you saying it should be done outside PHPStan? I see that there are quite some occurrences of mysqli_stmt:: in the function map.

@ondrejmirtes
Copy link
Member

Nope, in PHPStan. functionMap isn't for properties. But PHPDocs in stub file would work.

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