phpstan @return a concrete class that is generic #10801
Replies: 2 comments
-
Hello, this is a good question. PHPStan doesn't know that Please be aware that with this suggestion #6732 (comment) your error will no longer be reported. But right now it's okay to use Code that wouldn't need |
Beta Was this translation helpful? Give feedback.
0 replies
-
thank you Ondrej and thanks for writing phpstan.
- ddw
Doug Wilbourne
757-617-3238
…On Fri, Mar 29, 2024 at 2:50 AM Ondřej Mirtes ***@***.***> wrote:
Hello, this is a good question. PHPStan doesn't know that new
CollectionOrdered() is CollectionOrdered<PayloadType>.
Please be aware that with this suggestion #6732 (comment)
<#6732 (comment)>
your error will no longer be reported.
But right now it's okay to use @var:
https://phpstan.org/r/7897ad9f-d714-44df-b59a-ed83aac3ff61
Code that wouldn't need @var would look something like this:
https://phpstan.org/r/b80de7dd-15f8-4c3b-afea-7d76e76df6a0
—
Reply to this email directly, view it on GitHub
<#10801 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI6RP7TYY5GSMD4LP7RNVUDY2T6KZAVCNFSM6AAAAABFNUJHN2VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DSNBYGY2DG>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
sorry to ask what I think is a really basic question, but what is wrong with this code? Thanks in advance.....
factory returning a generic
Beta Was this translation helpful? Give feedback.
All reactions