PHPDoc type hint for variable that can be looped over or act as array?
I'm not sure what exactly PHPDoc type hint should be for a variable that is either array or an object that can act like an array? I have come up with some ideas but I'm not 100% sure about them:
The param has to be an array or an object that can be used in foreach:
The param has be be an array or an object that can use all ArrayAccess features like foreach, count(), square bracket element access, etc.:
* @param array|Traversable $subscribers
Am I doing it right?
* @param array|ArrayAccess $subscribers