Is it possible to indicate that an object behaves like a container, implements \ArrayAccess when writing a doc, specifically, a @return one.
For example if I have a class Collection implements \ArrayAccess, \Countable, \IteratorAggregate object filled with Entity objects from database.
What I'd like to have is PHPStorm (specifically) to have hints available for Collection objects as well as to understand what values they have.
Currently we have this notation for arrays of objects
/**
* @return \Entity[]
*/
This means the method returns an array of Entities. How may I do the same for a different class? I'm thinking about something like this:
/**
* @return \Entity[\Collection]
*/
I have created a pastebin (note that it has links to two more pastebins for Entity and Collection classes).



\Entity[\Collection](in other words: what it means for you).\Entity[]currently means the return value is an array consisting of multiple entities.\Collection|\Entity[]syntax? That's the only one I can think of right now.ORstatement, looks interesting, but PHPStorm autocompletes only for the first mentioned class, in this case, the \Collection :(