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

Changing return type of getSingleScalarResult() to array|bool|float|int|string|null #10695

Closed
wants to merge 1 commit into from

Conversation

ThomasLandauer
Copy link
Contributor

Reason: I'm using intval() to sanitize the result of getSingleScalarResult(). But now, PHPStan 1.10.15 complains that intval() only accepts bool|float|int|resource|string|null as input: phpstan/phpstan#9295
So I threw all of these (except resource) in here :-)
I didn't doublecheck anything - waiting for some feedback first.

…t|int|string|null`

Reason: I'm using `intval()` to sanitize the result of `getSingleScalarResult()`. But now, PHPStan 1.10.15 complains that `intval()` only accepts `bool|float|int|resource|string|null` as input: phpstan/phpstan#9295
So I threw all of these (except `resource`) in here :-)
I didn't doublecheck anything - waiting for some feedback first.
@phansys
Copy link
Contributor

phansys commented May 23, 2023

I didn't find this PR before, so I've created #10721. Sorry for that.

I didn't doublecheck anything - waiting for some feedback first.

Based on n my tests, I can confirm this method can not return array or null.

@ThomasLandauer
Copy link
Contributor Author

Never mind - so I'm closing here :-)

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.

2 participants