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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

NULL in combination with @template is not working as expected #5748

Closed
voku opened this issue Oct 6, 2021 · 2 comments
Closed

NULL in combination with @template is not working as expected #5748

voku opened this issue Oct 6, 2021 · 2 comments

Comments

@voku
Copy link
Contributor

voku commented Oct 6, 2021

Bug report

Because "bound type null is not supported" I tried to add NULL into the methods, maybe this is not working at all? 馃

Code snippet that reproduces the problem

https://phpstan.org/r/5866bcc1-e723-4ad8-8874-334511da0581

Expected output

no error

Did PHPStan help you today? Did it make you happy in any way?

I try to implement some value objects, and I am sure PHPStan will help me find the parts where I need to change the code. 馃憤

@voku voku changed the title expects (TValue of bool|float|int|string|null)|null, (TValue of bool|float|int|string|null)|null given Type "NULL" in combination with @template is not working as expected Oct 6, 2021
@voku voku changed the title Type "NULL" in combination with @template is not working as expected "NULL" in combination with @template is not working as expected Oct 6, 2021
@voku voku changed the title "NULL" in combination with @template is not working as expected NULL in combination with @template is not working as expected Oct 6, 2021
@ondrejmirtes
Copy link
Member

Hi, thank you for your kind words! This looks like a duplicate of: #5591

@github-actions
Copy link

github-actions bot commented Nov 7, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants