mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 18:13:13 +00:00
Simplified ReturnTag parsing.
This commit is contained in:
@@ -37,12 +37,12 @@ class ReturnTag extends Tag
|
||||
public function __construct($type, $content, DocBlock $docblock = null)
|
||||
{
|
||||
parent::__construct($type, $content, $docblock);
|
||||
$content = preg_split('/[\ \t]+/u', $this->description, 2);
|
||||
$content = preg_split('/\s+/u', $this->description, 2);
|
||||
|
||||
// any output is considered a type
|
||||
$this->type = array_shift($content);
|
||||
$this->type = $content[0];
|
||||
|
||||
$this->description = implode(' ', $content);
|
||||
$this->description = isset($content[1]) ? $content[1] : '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user