diff --git a/src/Barryvdh/Reflection/DocBlock/Tag/MethodTag.php b/src/Barryvdh/Reflection/DocBlock/Tag/MethodTag.php index 9f83028..5674c94 100644 --- a/src/Barryvdh/Reflection/DocBlock/Tag/MethodTag.php +++ b/src/Barryvdh/Reflection/DocBlock/Tag/MethodTag.php @@ -76,7 +76,15 @@ class MethodTag extends ReturnTag )? # Return type (?: - ([\w\|_\\\\]+) + ( + (?:[\w\|_\\\\]*\$this[\w\|_\\\\]*) + | + (?: + (?:[\w\|_\\\\]+) + # array notation + (?:\[\])* + )* + ) \s+ )? # Legacy method name (not captured)