Skip to content

Can't properly determine Object_'s name without context #236

@Amegatron

Description

@Amegatron

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions