class ParsedPhpDoc (View source)

Value object representing parsed PhpDoc information.

Contains all extracted data from a PhpDoc comment block.

Properties

string|null $rawPhpDoc
string|null $returnType
array $paramTypes
string|null $varType
string|null $sinceVersion
string|null $removedVersion
bool $isDeprecated
string[] $optionalParams

Names of parameters marked as [optional] in param PhpDoc descriptions.

Methods

__construct(string|null $rawPhpDoc = null, string|null $returnType = null, array $paramTypes = [], string|null $varType = null, string|null $sinceVersion = null, string|null $removedVersion = null, bool $isDeprecated = false, array $optionalParams = [])

Create a new ParsedPhpDoc instance.

Details

__construct(string|null $rawPhpDoc = null, string|null $returnType = null, array $paramTypes = [], string|null $varType = null, string|null $sinceVersion = null, string|null $removedVersion = null, bool $isDeprecated = false, array $optionalParams = [])

Create a new ParsedPhpDoc instance.

All properties can be set via constructor for convenience.

Parameters

string|null $rawPhpDoc
string|null $returnType
array $paramTypes
string|null $varType
string|null $sinceVersion
string|null $removedVersion
bool $isDeprecated
array $optionalParams