adamwojs / php-cs-fixer-phpdoc-force-fqcn
Installs: 685 133
Dependents: 23
Suggesters: 0
Security: 0
Stars: 18
Watchers: 2
Forks: 7
Open Issues: 2
Requires
- php: ^7.1||^8.0
- friendsofphp/php-cs-fixer: ^3.0
This package is not auto-updated.
Last update: 2024-12-15 23:47:14 UTC
README
php-cs-fixer rule to force using FQCN (Fully-Qualified Class Name) in DocBlock comments.
Installation
You can install the package via composer:
composer require --dev adamwojs/php-cs-fixer-phpdoc-force-fqcn
Usage
In your .php_cs file:
<?php // PHP-CS-Fixer 2.x syntax return PhpCsFixer\Config::create() // (1) Register \AdamWojs\PhpCsFixerPhpdocForceFQCN\Fixer\Phpdoc\ForceFQCNFixer fixer ->registerCustomFixers([ new \AdamWojs\PhpCsFixerPhpdocForceFQCN\Fixer\Phpdoc\ForceFQCNFixer() ]) ->setRules([ // ... // (2) Enable AdamWojs/phpdoc_force_fqcn_fixer rule 'AdamWojs/phpdoc_force_fqcn_fixer' => true, ]) // ... ;