public static function comment($comment)
{
$text = null;
$tags = array();
$description = null;
$comment = trim(preg_replace('/^(\\s*\\/\\*\\*|\\s*\\*{1,2}\\/|\\s*\\* ?)/m', '', $comment));
$comment = str_replace("\r\n", "\n", $comment);
if ($items = preg_split('/\\n@/ms', $comment, 2)) {
list($description, $tags) = $items + array('', '');
$tags = $tags ? static::tags("@{$tags}") : array();
}
if (strpos($description, "\n\n")) {
list($description, $text) = explode("\n\n", $description, 2);
}
$text = trim($text);
$description = trim($description);
return compact('description', 'text', 'tags');
}