DocblockParser
Turns a raw docblock into a DocBlock.
A real parser rather than the line-stripping regexes the framework uses elsewhere, because a reference page needs the tags those throw away: @param and @return carry the narrow types (list<Route> where the signature only says array), and @throws is a section of its own.
Synopsis
Section titled “Synopsis”final class DocblockParser
| Source | Docblock/DocblockParser.php |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(): mixed
Returns mixed
Methods
Section titled “Methods”| Method | Description |
|---|---|
parse(?string $docComment): DocBlock | Parses a docblock, treating a missing or unparsable one as simply empty. |
parse()
Section titled “parse()”public function parse(?string $docComment): DocBlock
Parses a docblock, treating a missing or unparsable one as simply empty.
| Parameter | Type | Description |
|---|---|---|
$docComment | ?``string |
Returns DocBlock