Skip to content

Literal strings/ints causes classes not to be FQCNed #348

@kkmuffme

Description

@kkmuffme

Given this:

/**
 * @param 'GET'|SomeClass $arg
 */

where the context correctly contains the SomeClass FQCN (Foo\SomeClass), it will not correctly create this:

$docblock = $docBlockFactory->create($comment, $context);

Nothing is thrown/no error, but the output is identical to the input, even though it should be:

/**
 * @param 'GET'|Foo\SomeClass $arg
 */

When removing the literal string, it works correctly.
The same issue also happens when using literal ints (e.g 9|SomeClass)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions