Open mundschenk-at opened 3 years ago
I see! Imported classes are not modified in PHPDoc blocks. FQCN should be used in PHPDoc (and in exceptions) but the WP-CLI project does not seem to be doing that.
Talked about in https://github.com/GiacoCorsiglia/php-stubs-generator/issues/8
@mundschenk-at If you convince @schlessera to always use FQCN ...
Unlikely. Always using FQCN in doc blocks makes them very unwieldy if you have deeply nested namespaces.
FQCN should be used in PHPDoc (and in exceptions) but the WP-CLI project does not seem to be doing that.
Not according to https://docs.phpdoc.org/3.0/guide/guides/types.html
This is not a technical rule. It makes PHPDoc blocks easy to understand.
WP_CLI\Formatter::display_items
hasIterator
(without the\
) set as the type of its parameter$items
, expanding toWP_CLI\Iterator
.