-
-
Notifications
You must be signed in to change notification settings - Fork 742
Closed
Labels
Description
Feature Request
Hello, I've added Type::toPhpDocNode() in PHPStan 1.10.14. You could use that instead of TypeMapperInterface::mapToPHPStanPhpDocTypeNode() and PHPStanStaticTypeMapper::mapToPHPStanPhpDocTypeNode() to convert PHPStan\Type\Type back into phpstan/phpdoc-parser AST node and be able to delete a bunch of your own code.
Of course, it's not going to be have exactly 1:1 as your code does now, but we can work out the differences together for the best outcome 👍
The advantage of PHPStan\Type\Type::toPhpDocNode() is that it's trying to be as precise as possible, and will also work for any new added types in PHPStan in the future.
Reactions are currently unavailable