Copied!

Factory class creating tags using phpstan's parser

This class uses {@see \PHPStanFactory} implementations to create tags from the ast of the phpstan docblock parser.

  • internal This class is not part of the BC promise of this library.
CloneableInstantiable
Properties
private array $factories
 
  • var \PHPStanFactory[]
private PHPStan\PhpDocParser\Lexer\Lexer $lexer
private PHPStan\PhpDocParser\Parser\PhpDocParser $parser
Methods
private tokenizeLine(string $tagLine) : PHPStan\PhpDocParser\Parser\TokenIterator
 

Solve the issue with the lexer not tokenizing the line correctly

This method is a workaround for the lexer that includes newline tokens with spaces. For phpstan this isn't an issue, as it doesn't do a lot of things with the indentation of descriptions. But for us is important to keep the indentation of the descriptions, so we need to fix the lexer output.

© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration