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 cd7233e50a
commit 58aab9c891
2 changed files with 2 additions and 3 deletions
@@ -199,8 +199,6 @@ class DocBlock implements \Reflector
continue; continue;
} }
$tag_line = ltrim($tag_line);
if (isset($tag_line[0]) && ($tag_line[0] === '@')) { if (isset($tag_line[0]) && ($tag_line[0] === '@')) {
$result[] = $tag_line; $result[] = $tag_line;
} else { } else {
@@ -34,7 +34,8 @@ class ReturnTag extends ParamTag
{ {
$this->tag = $type; $this->tag = $type;
$this->content = $content; $this->content = $content;
$content = preg_split('/\s+/u', $content);
$content = preg_split('/[\ \t]+/u', $content, 2);
// any output is considered a type // any output is considered a type
$this->type = array_shift($content); $this->type = array_shift($content);