Summery

Used to parse general doc-block description.

It produces data under two keys:

  • summery - a first line of description
  • description - whole description (including the first line)
/**
 * This is summery.
 * And this is a second line
 * of multiline description.
 */
function foo()
{

}
$doc = (new ReflectionFunction('foo'))->getDocComment();
$customTags = [new Summery()];

$notations = getNotations($doc, $customTags);
var_export($notations);

That results in

[
    'summery' => 'This is summery.',
    'description' => "This is summery.\nAnd this is a second line\nof multiline description."
]

If desciption contains empty lines, they are not included in parsed result, just skipped.