phpDocumentor / fig-standards

Standards either proposed or approved by the Framework Interop Group
http://www.php-fig.org/
Other
361 stars 85 forks source link

What defines a collection? #130

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hello

The section on collections in PSR-5 sounds very useful [1]. I'm wondering how one demarcates a collection? In the example, ArrayObject is used, which is an internal class in PHP, but can we also use this syntax for or own classes? If so, do we need to have some special tag in the class docblock that indicates this is possible, such as @collection or is this unnecessary?

Finally, does this syntax also apply to the built-in array construct, allowing us to use a construct such as array<int, string> or int[string] (not unlike the D programming language)?

[1] https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md#collections

ghost commented 8 years ago

Once again I should have looked better before opening a ticket: it seems there is already a PR under "generics" (I only searched for "Collection").