~Making TemplateTagParser::parseTemplateTagValue() static seemed like the best approach to fix a circular dependency between TypeParser and TemplateTagParser, as it means the TypeParser must be passed for each call.~
Also parseOptionalDescription was awkward to handle as it only needs to be used in PhpDocParser and calls many private functions of PhpDocParser, so i reworked that to be a callable instead of a boolean flag.
Follow on from: https://github.com/phpstan/phpdoc-parser/pull/199 originally by @mvorisek
~Making
TemplateTagParser::parseTemplateTagValue()
static seemed like the best approach to fix a circular dependency betweenTypeParser
andTemplateTagParser
, as it means theTypeParser
must be passed for each call.~Also
parseOptionalDescription
was awkward to handle as it only needs to be used inPhpDocParser
and calls many private functions ofPhpDocParser
, so i reworked that to be a callable instead of a boolean flag.