Fix the regex for annotations with values

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-01-17 14:22:25 +01:00 committed by Bjoern Schiessle
parent df296249d6
commit 29a0a23918
No known key found for this signature in database
GPG Key ID: 2378A753E2BF04F6
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ class ControllerMethodReflector implements IControllerMethodReflector{
$docs = $reflection->getDocComment();
// extract everything prefixed by @ and first letter uppercase
preg_match_all('/@([A-Z]\w+)/', $docs, $matches);
preg_match_all('/^\h+\*\h+@(?P<annotation>[A-Z]\w+)(\h+(?P<parameter>\w+))?$/m', $docs, $matches);
$this->annotations = $matches[1];
// extract type parameter information