PhpDocParser
in package
Tags
Table of Contents
- DISALLOWED_DESCRIPTION_START_TOKENS = [PHPStanPhpDocParserLexerLexer::TOKEN_UNION, PHPStanPhpDocParserLexerLexer::TOKEN_INTERSECTION]
- $constantExprParser : ConstExprParser
- $doctrineConstantExprParser : ConstExprParser
- $parseDoctrineAnnotations : bool
- $preserveTypeAliasesWithInvalidTypes : bool
- $requireWhitespaceBeforeDescription : bool
- $textBetweenTagsBelongsToDescription : bool
- $typeParser : TypeParser
- $useIndexAttributes : bool
- $useLinesAttributes : bool
- __construct() : mixed
- parse() : PhpDocNode
- parseTag() : PhpDocTagNode
- parseTagValue() : PhpDocTagValueNode
- enrichWithAttributes() : T
- parseAssertParameter() : array{parameter: string}|array{parameter: string, property: string}|array{parameter: string, method: string}
- parseAssertTagValue() : AssertTagValueNode|AssertTagPropertyValueNode|AssertTagMethodValueNode
- parseChild() : PhpDocChildNode
- parseDeprecatedTagValue() : DeprecatedTagValueNode
- parseDoctrineArgument() : DoctrineArgument
- parseDoctrineArguments() : array<int, DoctrineArgument>
- parseDoctrineArgumentValue() : DoctrineValueType
- parseDoctrineArrayItem() : DoctrineArrayItem
- parseDoctrineArrayKey() : ConstExprIntegerNode|ConstExprStringNode|IdentifierTypeNode|ConstFetchNode
- parseDoctrineTagValue() : PhpDocTagValueNode
- parseExtendsTagValue() : PhpDocTagValueNode
- parseMethodTagValue() : MethodTagValueNode
- parseMethodTagValueParameter() : MethodTagValueParameterNode
- parseMixinTagValue() : MixinTagValueNode
- parseOptionalDescription() : string
- parseOptionalDescriptionAfterDoctrineTag() : string
- parseOptionalVariableName() : string
- parseParamClosureThisTagValue() : ParamClosureThisTagValueNode
- parseParamImmediatelyInvokedCallableTagValue() : ParamImmediatelyInvokedCallableTagValueNode
- parseParamLaterInvokedCallableTagValue() : ParamLaterInvokedCallableTagValueNode
- parseParamOutTagValue() : ParamOutTagValueNode
- parseParamTagValue() : ParamTagValueNode|TypelessParamTagValueNode
- parsePropertyTagValue() : PropertyTagValueNode
- parseRequiredVariableName() : string
- parseRequireExtendsTagValue() : RequireExtendsTagValueNode
- parseRequireImplementsTagValue() : RequireImplementsTagValueNode
- parseReturnTagValue() : ReturnTagValueNode
- parseSelfOutTagValue() : SelfOutTagValueNode
- parseText() : PhpDocTextNode
- parseThrowsTagValue() : ThrowsTagValueNode
- parseTypeAliasImportTagValue() : TypeAliasImportTagValueNode
- parseTypeAliasTagValue() : TypeAliasTagValueNode
- parseVarTagValue() : VarTagValueNode
Constants
DISALLOWED_DESCRIPTION_START_TOKENS
private
mixed
DISALLOWED_DESCRIPTION_START_TOKENS
= [PHPStanPhpDocParserLexerLexer::TOKEN_UNION, PHPStanPhpDocParserLexerLexer::TOKEN_INTERSECTION]
Properties
$constantExprParser
private
ConstExprParser
$constantExprParser
$doctrineConstantExprParser
private
ConstExprParser
$doctrineConstantExprParser
$parseDoctrineAnnotations
private
bool
$parseDoctrineAnnotations
$preserveTypeAliasesWithInvalidTypes
private
bool
$preserveTypeAliasesWithInvalidTypes
$requireWhitespaceBeforeDescription
private
bool
$requireWhitespaceBeforeDescription
$textBetweenTagsBelongsToDescription
private
bool
$textBetweenTagsBelongsToDescription
$typeParser
private
TypeParser
$typeParser
$useIndexAttributes
private
bool
$useIndexAttributes
$useLinesAttributes
private
bool
$useLinesAttributes
Methods
__construct()
public
__construct(TypeParser $typeParser, ConstExprParser $constantExprParser[, bool $requireWhitespaceBeforeDescription = false ][, bool $preserveTypeAliasesWithInvalidTypes = false ][, array{lines?: bool, indexes?: bool} $usedAttributes = [] ][, bool $parseDoctrineAnnotations = false ][, bool $textBetweenTagsBelongsToDescription = false ]) : mixed
Parameters
- $typeParser : TypeParser
- $constantExprParser : ConstExprParser
- $requireWhitespaceBeforeDescription : bool = false
- $preserveTypeAliasesWithInvalidTypes : bool = false
- $usedAttributes : array{lines?: bool, indexes?: bool} = []
- $parseDoctrineAnnotations : bool = false
- $textBetweenTagsBelongsToDescription : bool = false
Return values
mixed —parse()
public
parse(TokenIterator $tokens) : PhpDocNode
Parameters
- $tokens : TokenIterator
Return values
PhpDocNode —parseTag()
public
parseTag(TokenIterator $tokens) : PhpDocTagNode
Parameters
- $tokens : TokenIterator
Return values
PhpDocTagNode —parseTagValue()
public
parseTagValue(TokenIterator $tokens, string $tag) : PhpDocTagValueNode
Parameters
- $tokens : TokenIterator
- $tag : string
Return values
PhpDocTagValueNode —enrichWithAttributes()
private
enrichWithAttributes(TokenIterator $tokens, T $tag, int $startLine, int $startIndex) : T
Parameters
- $tokens : TokenIterator
- $tag : T
- $startLine : int
- $startIndex : int
Tags
Return values
T —parseAssertParameter()
private
parseAssertParameter(TokenIterator $tokens) : array{parameter: string}|array{parameter: string, property: string}|array{parameter: string, method: string}
Parameters
- $tokens : TokenIterator
Return values
array{parameter: string}|array{parameter: string, property: string}|array{parameter: string, method: string} —parseAssertTagValue()
private
parseAssertTagValue(TokenIterator $tokens) : AssertTagValueNode|AssertTagPropertyValueNode|AssertTagMethodValueNode
Parameters
- $tokens : TokenIterator
Return values
AssertTagValueNode|AssertTagPropertyValueNode|AssertTagMethodValueNode —parseChild()
private
parseChild(TokenIterator $tokens) : PhpDocChildNode
Parameters
- $tokens : TokenIterator
Tags
Return values
PhpDocChildNode —parseDeprecatedTagValue()
private
parseDeprecatedTagValue(TokenIterator $tokens) : DeprecatedTagValueNode
Parameters
- $tokens : TokenIterator
Return values
DeprecatedTagValueNode —parseDoctrineArgument()
private
parseDoctrineArgument(TokenIterator $tokens) : DoctrineArgument
Parameters
- $tokens : TokenIterator
Return values
DoctrineArgument —parseDoctrineArguments()
private
parseDoctrineArguments(TokenIterator $tokens, bool $deep) : array<int, DoctrineArgument>
Parameters
- $tokens : TokenIterator
- $deep : bool
Return values
array<int, DoctrineArgument> —parseDoctrineArgumentValue()
private
parseDoctrineArgumentValue(TokenIterator $tokens) : DoctrineValueType
Parameters
- $tokens : TokenIterator
Return values
DoctrineValueType —parseDoctrineArrayItem()
private
parseDoctrineArrayItem(TokenIterator $tokens) : DoctrineArrayItem
Parameters
- $tokens : TokenIterator
Return values
DoctrineArrayItem —parseDoctrineArrayKey()
private
parseDoctrineArrayKey(TokenIterator $tokens) : ConstExprIntegerNode|ConstExprStringNode|IdentifierTypeNode|ConstFetchNode
Parameters
- $tokens : TokenIterator
Return values
ConstExprIntegerNode|ConstExprStringNode|IdentifierTypeNode|ConstFetchNode —parseDoctrineTagValue()
private
parseDoctrineTagValue(TokenIterator $tokens, string $tag) : PhpDocTagValueNode
Parameters
- $tokens : TokenIterator
- $tag : string
Return values
PhpDocTagValueNode —parseExtendsTagValue()
private
parseExtendsTagValue(string $tagName, TokenIterator $tokens) : PhpDocTagValueNode
Parameters
- $tagName : string
- $tokens : TokenIterator
Return values
PhpDocTagValueNode —parseMethodTagValue()
private
parseMethodTagValue(TokenIterator $tokens) : MethodTagValueNode
Parameters
- $tokens : TokenIterator
Return values
MethodTagValueNode —parseMethodTagValueParameter()
private
parseMethodTagValueParameter(TokenIterator $tokens) : MethodTagValueParameterNode
Parameters
- $tokens : TokenIterator
Return values
MethodTagValueParameterNode —parseMixinTagValue()
private
parseMixinTagValue(TokenIterator $tokens) : MixinTagValueNode
Parameters
- $tokens : TokenIterator
Return values
MixinTagValueNode —parseOptionalDescription()
private
parseOptionalDescription(TokenIterator $tokens[, bool $limitStartToken = false ]) : string
Parameters
- $tokens : TokenIterator
- $limitStartToken : bool = false
Return values
string —parseOptionalDescriptionAfterDoctrineTag()
private
parseOptionalDescriptionAfterDoctrineTag(TokenIterator $tokens) : string
Parameters
- $tokens : TokenIterator
Return values
string —parseOptionalVariableName()
private
parseOptionalVariableName(TokenIterator $tokens) : string
Parameters
- $tokens : TokenIterator
Return values
string —parseParamClosureThisTagValue()
private
parseParamClosureThisTagValue(TokenIterator $tokens) : ParamClosureThisTagValueNode
Parameters
- $tokens : TokenIterator
Return values
ParamClosureThisTagValueNode —parseParamImmediatelyInvokedCallableTagValue()
private
parseParamImmediatelyInvokedCallableTagValue(TokenIterator $tokens) : ParamImmediatelyInvokedCallableTagValueNode
Parameters
- $tokens : TokenIterator
Return values
ParamImmediatelyInvokedCallableTagValueNode —parseParamLaterInvokedCallableTagValue()
private
parseParamLaterInvokedCallableTagValue(TokenIterator $tokens) : ParamLaterInvokedCallableTagValueNode
Parameters
- $tokens : TokenIterator
Return values
ParamLaterInvokedCallableTagValueNode —parseParamOutTagValue()
private
parseParamOutTagValue(TokenIterator $tokens) : ParamOutTagValueNode
Parameters
- $tokens : TokenIterator
Return values
ParamOutTagValueNode —parseParamTagValue()
private
parseParamTagValue(TokenIterator $tokens) : ParamTagValueNode|TypelessParamTagValueNode
Parameters
- $tokens : TokenIterator
Return values
ParamTagValueNode|TypelessParamTagValueNode —parsePropertyTagValue()
private
parsePropertyTagValue(TokenIterator $tokens) : PropertyTagValueNode
Parameters
- $tokens : TokenIterator
Return values
PropertyTagValueNode —parseRequiredVariableName()
private
parseRequiredVariableName(TokenIterator $tokens) : string
Parameters
- $tokens : TokenIterator
Return values
string —parseRequireExtendsTagValue()
private
parseRequireExtendsTagValue(TokenIterator $tokens) : RequireExtendsTagValueNode
Parameters
- $tokens : TokenIterator
Return values
RequireExtendsTagValueNode —parseRequireImplementsTagValue()
private
parseRequireImplementsTagValue(TokenIterator $tokens) : RequireImplementsTagValueNode
Parameters
- $tokens : TokenIterator
Return values
RequireImplementsTagValueNode —parseReturnTagValue()
private
parseReturnTagValue(TokenIterator $tokens) : ReturnTagValueNode
Parameters
- $tokens : TokenIterator
Return values
ReturnTagValueNode —parseSelfOutTagValue()
private
parseSelfOutTagValue(TokenIterator $tokens) : SelfOutTagValueNode
Parameters
- $tokens : TokenIterator
Return values
SelfOutTagValueNode —parseText()
private
parseText(TokenIterator $tokens) : PhpDocTextNode
Parameters
- $tokens : TokenIterator
Return values
PhpDocTextNode —parseThrowsTagValue()
private
parseThrowsTagValue(TokenIterator $tokens) : ThrowsTagValueNode
Parameters
- $tokens : TokenIterator
Return values
ThrowsTagValueNode —parseTypeAliasImportTagValue()
private
parseTypeAliasImportTagValue(TokenIterator $tokens) : TypeAliasImportTagValueNode
Parameters
- $tokens : TokenIterator
Return values
TypeAliasImportTagValueNode —parseTypeAliasTagValue()
private
parseTypeAliasTagValue(TokenIterator $tokens) : TypeAliasTagValueNode
Parameters
- $tokens : TokenIterator
Return values
TypeAliasTagValueNode —parseVarTagValue()
private
parseVarTagValue(TokenIterator $tokens) : VarTagValueNode
Parameters
- $tokens : TokenIterator