Multiline @return statements were stripped from their newlines and indent

@return statements (and effectively others) were stripped from their newlines
and indentation. By tweaking the reflection a bit was this effect countered.
This commit is contained in:
Mike van Riel
2012-09-10 16:50:44 +02:00
parent 91ef535ae3
commit 60ba10fad1
2 changed files with 2 additions and 3 deletions
@@ -199,8 +199,6 @@ class DocBlock implements \Reflector
continue;
}
$tag_line = ltrim($tag_line);
if (isset($tag_line[0]) && ($tag_line[0] === '@')) {
$result[] = $tag_line;
} else {
@@ -34,7 +34,8 @@ class ReturnTag extends ParamTag
{
$this->tag = $type;
$this->content = $content;
$content = preg_split('/\s+/u', $content);
$content = preg_split('/[\ \t]+/u', $content, 2);
// any output is considered a type
$this->type = array_shift($content);