phpDocumentor / phpDocumentor/Reflection
Can't properly determine Object_'s name without context
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 125
- Forks
- 60
- Avg merge
- 2m
- Merged PRs (30d)
- 9
Description
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:
Var_
Class
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two PhpDoc examples and inspect how Object_, getFqsen(), and getName() represent qualified names when no context is supplied. Done means the original relative versus absolute reference form can be distinguished or recovered without redundant context, with both examples behaving correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100