php-annotations/php-annotations — pull request #72 by aik099 (2014-08-20 21:23:38+00:00)
Title: Unsure that returned annotation indexes are sequential

During a process of filtering out inherited annotations (when annotation was defined as inherited=true+multiple=false) the annotations at the beginning of the annotations array are unset making impossible accessing first found annotation via `$annotations[0]` code.

Applying `array_values` on a result should solve that problem.

In library's code such `[0]` is only present in the `AnnotationManager::getUsage` method (see https://github.com/php-annotations/php-annotations/blob/master/src/annotations/AnnotationManager.php#L419-L423) where presumption that `@usage` annotation should be at 0 index produces PHP warning about accesing undefined array index.

Added tests add missing coverage for `@usage` annotation validation.