From 2812eac046cafff0ecf065da90d4dca0729cac65 Mon Sep 17 00:00:00 2001 From: Vasil Rangelov Date: Fri, 16 Nov 2012 21:53:17 +0200 Subject: [PATCH] Simplified ReturnTag parsing. --- src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php b/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php index c4b3ae8..985d890 100644 --- a/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php +++ b/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php @@ -37,12 +37,12 @@ class ReturnTag extends Tag public function __construct($type, $content, DocBlock $docblock = null) { parent::__construct($type, $content, $docblock); - $content = preg_split('/[\ \t]+/u', $this->description, 2); + $content = preg_split('/\s+/u', $this->description, 2); // any output is considered a type - $this->type = array_shift($content); + $this->type = $content[0]; - $this->description = implode(' ', $content); + $this->description = isset($content[1]) ? $content[1] : ''; } /**