TypeLang is a toolkit for the type syntax of PHPDoc: the one you write
in @param, @return and @var for PHPStan and
Psalm.
$type = new TypeLang\Parser\TypeParser()
->parse('array<non-empty-string, list<User>|null>');| Package | What it does |
|---|---|
| parser | Type string to AST |
| types | AST nodes |
| printer | AST back to a string |
| reader | PHP Reflection to AST |
| phpdoc | DocBlock to description and tags |
| mapper | Maps data to objects and back by these types |