From 92572a998291ed21b3596aa5303db2faa03d601b Mon Sep 17 00:00:00 2001 From: Vasil Rangelov Date: Tue, 13 Nov 2012 19:23:42 +0200 Subject: [PATCH] Updated @author in accordance with the latest changes. --- .../Reflection/DocBlock/Tag/AuthorTag.php | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php b/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php index 675dd76..65876d1 100644 --- a/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php +++ b/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php @@ -18,7 +18,7 @@ use phpDocumentor\Reflection\DocBlock\Tag; /** * Reflection class for an @author tag in a Docblock. * - * @author Mike van Riel + * @author Vasil Rangelov * @license http://www.opensource.org/licenses/mit-license.php MIT * @link http://phpdoc.org */ @@ -42,28 +42,26 @@ class AuthorTag extends Tag */ public function __construct($type, $content, DocBlock $docblock = null) { - $this->tag = $type; - $this->content = $content; + parent::__construct($type, $content, $docblock); if (preg_match( - '/^ - # Name - ([^\<]*) + '/^ + # Name + ([^\<]*) + (?: + # URIs + \<([^>]*)\>\s* + # Role (?: - # URIs - \<([^>]*)\>\s* - # Role - (?: - \(([^\)]*)\) - )? - # Description - (.*) + \(([^\)]*)\) )? - $/sux', - $content, - $matches - ) - ) { - $this->name = trim($matches[1]); + # Description + (.*) + )? + $/sux', + $this->description, + $matches + )) { + $this->name = rtrim($matches[1]); if (isset($matches[2])) { $matches[2] = trim($matches[2]); if ('' !== $matches[2]) {