Open flaviovs opened 3 years ago
I found these snippets:
While this shouldn't affect scalars, use
position does matter, as it only affects the code that follows: https://3v4l.org/vMriL
So if you reference any imported classes in your docblock you would have to put it after the use
.
Sure, with the addendum for fully qualified class names, which should also work even before use
, otherwise file-level doc-blocks would be impossible.
https://psalm.dev/r/b6e56c987d
Comment out the "use" statement on line 6 and the error goes away.
Swapping
use
and doc-block positions also gets rid of the error, but this is far from ideal since the doc-block is supposed to have file-wide documentation (this construct is very common in frameworks that use PHP as template variable, such as Yii).