Laravel seems to refer to classes by their FQCN in PHPDoc blocks but imports them otherwise, for example:
use Illuminate\Support\Collection;
/**
* @return \Illuminate\Support\Collection
*/
function foo(): Collection
Do you think we should stick with that convention?
@lucasmichot are there any exceptions to this rule?
Is there an automated refactoring/transformation available for this in PHPStorm?
There is no exception.
There is a setting in PHPStorm to ensure the newly created docblocks are with FCQN notations.
No refactoring tool (php-cs-fixer...) that I know provide any transformer.
Can you post a screenshot where that setting is made?
I think the easiest transformation should be to simply delete and recreate the relevant parts of the DocBlocks.

Since it is the Laravel way, we will do PHPDocs with FQCN in the future. I will keep this issue open until we converted all Doc blocks.
I guess this can be closed @spawnia :-)
Most helpful comment