From 053005ed4e908ec0a7b1651fde34f6e98563f0c1 Mon Sep 17 00:00:00 2001 From: Jeppe Knockaert Date: Thu, 13 Dec 2018 10:11:51 +0100 Subject: [PATCH] feature - Improve method tag parsing This is an update based on the original repository, I just cherry-picked some code. https://github.com/phpDocumentor/ReflectionDocBlock/blob/master/src/DocBlock/Tags/Method.php This includes: - https://github.com/phpDocumentor/ReflectionDocBlock/commit/e9454d844db9d8fd2f276a2069647c3c4fb15085 - https://github.com/phpDocumentor/ReflectionDocBlock/commit/e9454d844db9d8fd2f276a2069647c3c4fb15085 --- src/Barryvdh/Reflection/DocBlock/Tag/MethodTag.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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)