Skip to content

Extending Doctrine ArrayCollection #4825

Discussion options

You must be logged in to vote

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

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@bramcordie
Comment options

@ondrejmirtes
Comment options

@bramcordie
Comment options

@ikvasnica
Comment options

@ondrejmirtes
Comment options

Answer selected by ondrejmirtes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
3 participants