Extending Doctrine ArrayCollection #4825
-
I have a Custom collection class that extends Doctrine ArrayCollection, which has template annotations out of the box. The ArrayCollection class has a If I remove the Simplified versions of both the ArrayCollection and the custom class: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi, But in your case |
Beta Was this translation helpful? Give feedback.
Hi,
static<TKey, T>
is a very weird syntax, because you don't know what template type variables are the child classes going to use. I'm not sure how that should work.But in your case
@return static
is sufficient: https://phpstan.org/r/626013ff-7559-4238-9ff4-95053f0d0a6c