Skip to content

Commit 053005e

Browse files
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: - phpDocumentor@e9454d8 - phpDocumentor@e9454d8
1 parent 3dcbd98 commit 053005e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Barryvdh/Reflection/DocBlock/Tag/MethodTag.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,15 @@ public function setContent($content)
7676
)?
7777
# Return type
7878
(?:
79-
([\w\|_\\\\]+)
79+
(
80+
(?:[\w\|_\\\\]*\$this[\w\|_\\\\]*)
81+
|
82+
(?:
83+
(?:[\w\|_\\\\]+)
84+
# array notation
85+
(?:\[\])*
86+
)*
87+
)
8088
\s+
8189
)?
8290
# Legacy method name (not captured)

0 commit comments

Comments
 (0)