Consider such PhpDoc comment as an example:
/**
* @param DocBlock\Tags\Var_ $varTag
*
* @return \My\Super\Class
*/
When parsing this, I will have two Object_'s, one for DocBlock\Tags\Var_, second for \My\Super\Class. The problem is that if I have no context, (string) $object->getFqsen() will return them both with leading slash:
\DocBlock\Tags\Var_
\My\Super\Class
While $type->getFqsen()->getName() will return just the last part of the name for both of them:
Meaning, that I can't get the original form of the reference without specifying the context, which I don't actually want to, cause it is redundant in my case.
Consider such PhpDoc comment as an example:
When parsing this, I will have two
Object_'s, one forDocBlock\Tags\Var_, second for\My\Super\Class. The problem is that if I have no context,(string) $object->getFqsen()will return them both with leading slash:While
$type->getFqsen()->getName()will return just the last part of the name for both of them:Meaning, that I can't get the original form of the reference without specifying the context, which I don't actually want to, cause it is redundant in my case.