mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
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:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user