adamwojs/php-cs-fixer-phpdoc-force-fqcn
PHP-CS-Fixer custom rule that forces fully qualified class names in PHPDoc annotations. Ensures consistent, unambiguous @param/@return/@var types by converting short names to FQCNs, improving readability and reducing namespace-related confusion.
Adopt if:
Some\Class vs. \Some\Class).Look elsewhere if:
use Class as Alias).parameters.docblock.type rules) that already cover this.For Executives:
"This is a low-cost, high-impact way to standardize our code documentation. By enforcing FQCNs in DocBlocks via PHP-CS-Fixer, we’ll reduce bugs from ambiguous references (e.g., Class vs. \Vendor\Class) and improve IDE tooling—all without manual reviews. It’s a 10-minute setup with years of maintenance savings, aligning with our quality and DX goals."
For Engineering/DevOps: *"We’re adding a PHP-CS-Fixer rule to auto-fix DocBlock FQCN inconsistencies. This:
use Class; vs. \Class in docs.For Developers:
"Your PRs might get auto-updated to use \Vendor\Class instead of Class in DocBlocks—this makes IDE hints and static analysis (PHPStan) more reliable. It’s opt-in for now; let us know if it breaks your workflow!"
How can I help you explore Laravel packages today?