From 60ba10fad1cf05066872b953a8b8d0cd204de9ee Mon Sep 17 00:00:00 2001 From: Mike van Riel Date: Mon, 10 Sep 2012 16:50:44 +0200 Subject: [PATCH] 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. --- src/phpDocumentor/Reflection/DocBlock.php | 2 -- src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/phpDocumentor/Reflection/DocBlock.php b/src/phpDocumentor/Reflection/DocBlock.php index 941c858..3959bbd 100644 --- a/src/phpDocumentor/Reflection/DocBlock.php +++ b/src/phpDocumentor/Reflection/DocBlock.php @@ -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 { diff --git a/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php b/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php index 88c631b..3c7725f 100644 --- a/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php +++ b/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php @@ -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);