Skip to content

Commit 2812eac

Browse files
committed
Simplified ReturnTag parsing.
1 parent db20ae3 commit 2812eac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ class ReturnTag extends Tag
3737
public function __construct($type, $content, DocBlock $docblock = null)
3838
{
3939
parent::__construct($type, $content, $docblock);
40-
$content = preg_split('/[\ \t]+/u', $this->description, 2);
40+
$content = preg_split('/\s+/u', $this->description, 2);
4141

4242
// any output is considered a type
43-
$this->type = array_shift($content);
43+
$this->type = $content[0];
4444

45-
$this->description = implode(' ', $content);
45+
$this->description = isset($content[1]) ? $content[1] : '';
4646
}
4747

4848
/**

0 commit comments

Comments
 (0)