Hi,
I would like to share some (not very refined) ideas regarding the usage of PHPDoc annotations, to see if they can be of any interest. Since I am quite a fan of types, they all concern the ability of expressing typing information in the documentation.
1) One desirable feature which is missing from the language is the use of generics. It would be nice to provide their usage at the level of documentation. This is already possible for arrays with the `[]` notation. It would be nice to be able to write something like `Collection<User>` to denote that the collection contains `User` objects
2) Another great limitation in the PHP type system is the impossibility to type input and return types of callables. At the moment `callable` is the best documentation which can be provided. It would be nice to introduce a syntax like `callable: User -> string` to document the actual type of the callable.
3) Define the usage of type variables at the level of documentation. This would allow to declare that the types of two different entities are related. For example, one could desire to express that two variables need to have the same type, or that a callable should receive an input of the same type of another variable.
Marco Perone