PHPDoc parser. Unlike existing solutions, it immediately returns types in package format argo-php/types.
Parsing PHPDoc from a string:
use Argo\DocBlockParser\Parser;
use Argo\DocBlockParser\Context\ContextFactory;
use Argo\DocBlockParser\PhpDocFactory;
$phpDocParser = new Parser();
$phpDoc = $phpDocParser->parse('/** @var string $hello */');Getting all PHPDoc tags from reflection:
use Argo\DocBlockParser\Parser;
use Argo\DocBlockParser\Context\ContextFactory;
use Argo\DocBlockParser\PhpDocFactory;
$phpDocFactory = new PhpDocFactory(new Parser(), new ContextFactory());
$reflection = new \ReflectionClass('MyClassWithPhpDoc');
$phpDoc = $phpDocFactory->getPhpDocFromReflector($reflection);