Description
Bug Report
Q | A |
---|---|
BC Break | no |
Library Version | 0.6.0 |
PHP version | 7.4 |
Summary
It seems the php parser is using phpdocs and deciding that something like
/**
* @return array<int, string|int>
*/
is a class with FQCN My\Namespace\array<int, string|int>
which
then ofc fails to create a FullyQualifiedClassName.
I've opened a PR.
Current behavior
/**
* @return array<int, string|int>
*/
is interpreted as FQCN My\Namespace\array<int, string|int>
How to reproduce
Make it parse a class with a method that returns and array and has a docblok detailing the array, ie
/**
* @return array<int, array<string|int, string|int|float>>
*/
private function fetchInvoiceData(): array
{}
Expected behavior
we should ignore cases where
/**
* @return array<int, string|int>
*/
because the dependency is not a class, so we don't care about it.