Allow typed arrays in @method annotation.

Since the type resolver has support for typed arrays,
I allowed the syntax for the @method annotation.

In effect you can now annotate magic methods like:
    @method Object[] myMethod($arg1, $arg2)
    @method int[] myOtherMethod()
This commit is contained in:
Hidde Boomsma
2016-04-07 15:42:51 +02:00
parent 52723f0fb8
commit 10c99960dc
2 changed files with 53 additions and 3 deletions
+5 -1
View File
@@ -91,7 +91,11 @@ final class Method extends BaseTag implements Factory\StaticMethod
)?
# Return type
(?:
([\w\|_\\\\]+)
(
(?:[\w\|_\\\\]+)
# array notation
(?:\[\])*
)?
\s+
)?
# Legacy method name (not captured)