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

Open
opened 2026-01-22 16:14:23 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/10695

State: closed
Merged: No


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: https://github.com/phpstan/phpstan/issues/9295
So I threw all of these (except resource) in here :-)
I didn't doublecheck anything - waiting for some feedback first.

**Original Pull Request:** https://github.com/doctrine/orm/pull/10695 **State:** closed **Merged:** No --- 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: https://github.com/phpstan/phpstan/issues/9295 So I threw all of these (except `resource`) in here :-) I didn't doublecheck anything - waiting for some feedback first.
admin added the pull-request label 2026-01-22 16:14:23 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#12548